Files
Xor290 919c807004
ci-api / test (push) Failing after 8m7s
ci-web / test (push) Failing after 5m5s
chore: build
2026-09-20 12:18:33 +02:00

16 lines
515 B
Go

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)
group.GET("/verify/:role", h.GetRole)
}