Mode switching (#10) (#26)

This commit is contained in:
2026-02-16 11:30:46 +00:00
parent 4e5b873087
commit b7731bd83f
8 changed files with 771 additions and 83 deletions

View File

@@ -36,8 +36,16 @@ func main() {
auth := handlers.NewAuthHandler(cfg)
authLimiter := middleware.NewRateLimiter(1, 5)
api := r.Group("/api/v1")
{
api := r.Group("/api/v1")
{
api.GET("/health", func(c *gin.Context) {
c.JSON(200, gin.H{
"status": "ok",
"version": Version,
"database": database.IsConnected(),
})
})
authGroup := api.Group("/auth")
authGroup.Use(authLimiter.Limit())
{