removed comment and applied linter

This commit is contained in:
Gani Georgiev 2022-12-11 17:32:43 +02:00
parent b63268559f
commit f30c9f263f
2 changed files with 4 additions and 2 deletions

View File

@ -100,7 +100,7 @@ func InitApi(app core.App) (*echo.Echo, error) {
bindFileApi(app, api)
bindRealtimeApi(app, api)
bindLogsApi(app, api)
bindHealthApi(app, api) // health check should always be initialized after everything else is done
bindHealthApi(app, api)
// trigger the custom BeforeServe hook for the created api router
// allowing users to further adjust its options or register new routes

View File

@ -1,9 +1,10 @@
package apis
import (
"net/http"
"github.com/labstack/echo/v5"
"github.com/pocketbase/pocketbase/core"
"net/http"
)
// bindHealthApi registers the health api endpoint.
@ -24,5 +25,6 @@ func (api *healthApi) healthCheck(c echo.Context) error {
"code": http.StatusOK,
"message": "API is healthy.",
}
return c.JSON(http.StatusOK, payload)
}