diff --git a/backend/internal/router/router.go b/backend/internal/router/router.go index ff417cc..847357b 100644 --- a/backend/internal/router/router.go +++ b/backend/internal/router/router.go @@ -22,30 +22,13 @@ func Setup(cfg *config.Config) *gin.Engine { authHandler := handler.NewAuthHandler(userService) healthHandler := handler.NewHealthHandler(db.DB) - adminHandler := handler.NewAdminHandler(userService) // Public routes - r.POST("/api/auth/register", authHandler.Register) r.POST("/api/auth/local-login", authHandler.LocalLogin) r.POST("/api/auth/lookup-binding", authHandler.LookupBinding) r.POST("/api/auth/bind-keycloak", authHandler.BindKeycloak) r.POST("/api/auth/init", authHandler.InitAdmin) r.GET("/api/health", healthHandler.Check) - // Protected routes - api := r.Group("/api") - api.Use(middleware.AuthProxy()) - { - } - - // Admin routes - admin := api.Group("/admin") - admin.Use(middleware.RequireRole("admin")) - { - admin.GET("/users", adminHandler.ListUsers) - admin.POST("/users", adminHandler.CreateUser) - admin.DELETE("/users/:id", adminHandler.DeleteUser) - } - return r }