removed comment and applied linter
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@ func InitApi(app core.App) (*echo.Echo, error) {
|
|||||||
bindFileApi(app, api)
|
bindFileApi(app, api)
|
||||||
bindRealtimeApi(app, api)
|
bindRealtimeApi(app, api)
|
||||||
bindLogsApi(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
|
// trigger the custom BeforeServe hook for the created api router
|
||||||
// allowing users to further adjust its options or register new routes
|
// allowing users to further adjust its options or register new routes
|
||||||
|
|||||||
+3
-1
@@ -1,9 +1,10 @@
|
|||||||
package apis
|
package apis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/labstack/echo/v5"
|
"github.com/labstack/echo/v5"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// bindHealthApi registers the health api endpoint.
|
// bindHealthApi registers the health api endpoint.
|
||||||
@@ -24,5 +25,6 @@ func (api *healthApi) healthCheck(c echo.Context) error {
|
|||||||
"code": http.StatusOK,
|
"code": http.StatusOK,
|
||||||
"message": "API is healthy.",
|
"message": "API is healthy.",
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.JSON(http.StatusOK, payload)
|
return c.JSON(http.StatusOK, payload)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user