Boost Azure Demo
This commit is contained in:
13
Backend/internal/handlers/api/users/routes.go
Normal file
13
Backend/internal/handlers/api/users/routes.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package users
|
||||
|
||||
import (
|
||||
authmw "boostai-backend/internal/middleware"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func RegisterRoutes(app fiber.Router, auth *authmw.AuthMiddleware, h *Handler) {
|
||||
app.Get("/users", auth.RequireTeacher(), h.ListUsersByRole)
|
||||
app.Get("/users/:id", h.GetUserByID)
|
||||
app.Post("/users", auth.RequireTeacher(), h.CreateUser)
|
||||
}
|
||||
Reference in New Issue
Block a user