package users

import (
	"github.com/gofiber/fiber/v2"

	m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
	controller "gitlab.com/mbugroup/lti-api.git/internal/modules/users/controllers"
	user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
)

func UserRoutes(v1 fiber.Router, s user.UserService) {
	ctrl := controller.NewUserController(s)

	route := v1.Group("/users")
	route.Use(m.Auth(s))

	route.Get("/", m.RequirePermissions(m.P_UserGetAll), ctrl.GetAll)
	// route.Post("/", ctrl.CreateOne)
	route.Get("/:id", m.RequirePermissions(m.P_UserGetOne), ctrl.GetOne)
	// route.Patch("/:id", ctrl.UpdateOne)
	// route.Delete("/:id", ctrl.DeleteOne)
}
