fix: user reg
ci-agent / build (push) Failing after 3m0s

This commit is contained in:
d3m0k1d
2026-04-04 18:49:05 +03:00
parent 398c688fed
commit a71fde67e4
9 changed files with 1647 additions and 362 deletions
+2 -1
View File
@@ -144,13 +144,14 @@ func main() {
authGroup := v1.Group("/auth")
{
authGroup.POST("/login", auth.Login)
authGroup.POST("/register", auth.RegisterUser)
}
// Auth token management (requires auth)
authTokenGroup := v1.Group("/auth")
authTokenGroup.Use(auth.AuthMiddleware())
{
authTokenGroup.POST("/token", handlers.RequireAdmin(), auth.CreateToken)
authTokenGroup.POST("/token")
authTokenGroup.GET("/validate", auth.ValidateToken)
authTokenGroup.GET("/tokens", handlers.RequireAdmin(), auth.ListTokens)
authTokenGroup.DELETE("/token", auth.DeleteMyToken)