chore: Add ping route for API health check

This commit is contained in:
Mo Tarbin 2025-01-29 22:59:59 -05:00
parent 63fcdb6130
commit 0647725c68

View file

@ -610,5 +610,13 @@ func Routes(router *gin.Engine, h *Handler, auth *jwt.GinJWTMiddleware, limiter
authRoutes.POST("reset", h.resetPassword)
authRoutes.POST("password", h.updateUserPassword)
}
pingRoutes := router.Group("api/v1/ping")
pingRoutes.Use(utils.RateLimitMiddleware(limiter))
{
pingRoutes.GET("/", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
}
}