Retirer field Data.DBStatus de apiresponse.HealthGET

This commit is contained in:
Victor Lacasse-Beaudoin 2023-09-16 17:19:32 -04:00
parent c583220fd6
commit 622efd8d63
2 changed files with 0 additions and 14 deletions

View file

@ -5,7 +5,6 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.agecem.com/agecem/bottin-ag/apierror"
"git.agecem.com/agecem/bottin-ag/apiresponse" "git.agecem.com/agecem/bottin-ag/apiresponse"
bottindata "git.agecem.com/agecem/bottin/v5/data" bottindata "git.agecem.com/agecem/bottin/v5/data"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
@ -42,18 +41,6 @@ func (a *APIHandler) HealthGET(c echo.Context) error {
r.Data.BottinStatus = bottinStatus r.Data.BottinStatus = bottinStatus
} }
// TODO
r.Data.DBStatus = "not implemented"
if r.Data.BottinStatus == "not implemented" || r.Data.DBStatus == "not implemented" {
var err apierror.ErrBottinOrDBNotImplemented
r.Error = err.Error()
r.StatusCode = http.StatusInternalServerError
r.Message = "not ok"
return c.JSON(r.StatusCode, r)
}
return c.JSON(r.StatusCode, r) return c.JSON(r.StatusCode, r)
} }

View file

@ -13,7 +13,6 @@ type HealthGET struct {
Response Response
Data struct { Data struct {
BottinStatus string BottinStatus string
DBStatus string
} }
} }