chore: add health route

This commit is contained in:
Jesús Pérex 2025-06-20 20:35:29 +01:00
parent 6da1f91c2f
commit 58b86d545e

View File

@ -177,6 +177,9 @@ func getRoutes(router *gin.Engine, cfg *cfg.Config, users *UsersAccounts, mdlsUs
file,
)
})
router.GET("/v1/health", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "ok"})
})
if cfg.UseJWT {
router.NoRoute(routenv.AuthMiddleware.MiddlewareFunc(), func(c *gin.Context) {
claims := jwt.ExtractClaims(c)