mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
23 lines
942 B
Go
23 lines
942 B
Go
package adjustments
|
|
|
|
import (
|
|
m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
|
|
controller "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/adjustments/controllers"
|
|
adjustment "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/adjustments/services"
|
|
user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func AdjustmentRoutes(v1 fiber.Router, u user.UserService, s adjustment.AdjustmentService) {
|
|
ctrl := controller.NewAdjustmentController(s)
|
|
|
|
route := v1.Group("/adjustments")
|
|
route.Use(m.Auth(u))
|
|
// Standard CRUD routes following master data pattern
|
|
route.Get("/",m.RequirePermissions(m.P_AdjustmentGetAll), ctrl.AdjustmentHistory) // Get all with pagination and filters
|
|
route.Post("/",m.RequirePermissions(m.P_AdjustmentCreate), ctrl.Adjustment) // Create adjustment
|
|
route.Get("/:id",m.RequirePermissions(m.P_AdjustmentGetOne), ctrl.GetOne)
|
|
|
|
}
|