feat/BE/US-304/TASK-307,306-adjustment middleware check if user have permission,create all permission in modules lti

This commit is contained in:
ragilap
2025-12-10 08:53:09 +07:00
parent e6094528b5
commit 2effa08648
29 changed files with 289 additions and 136 deletions
@@ -16,9 +16,9 @@ func ChickinRoutes(v1 fiber.Router, u user.UserService, s chickin.ChickinService
route.Use(m.Auth(u))
// route.Get("/", ctrl.GetAll)
route.Post("/", ctrl.CreateOne)
route.Get("/:id", ctrl.GetOne)
route.Post("/",m.RequirePermissions(m.P_ChickinsCreateOne), ctrl.CreateOne)
route.Get("/:id",m.RequirePermissions(m.P_ChickinsGetOne), ctrl.GetOne)
// route.Patch("/:id", ctrl.UpdateOne)
// route.Delete("/:id", ctrl.DeleteOne)
route.Post("/approvals", ctrl.Approval)
route.Post("/approvals",m.RequirePermissions(m.P_ChickinsApproval), ctrl.Approval)
}