This commit is contained in:
CFOU
2026-09-14 20:50:19 +02:00
commit 3091fb4020
135 changed files with 10262 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package users
import "github.com/gin-gonic/gin"
// RegisterAdminRoutes mounts the user-management endpoints under the given
// group, guarded by the requireAdmin middleware supplied by the caller.
func RegisterAdminRoutes(rg *gin.RouterGroup, h *Handler, requireAdmin gin.HandlerFunc) {
group := rg.Group("/admin/users", requireAdmin)
group.GET("", h.List)
group.POST("", h.Create)
group.GET("/:id", h.Get)
group.PUT("/:id", h.Update)
group.DELETE("/:id", h.Delete)
}