package initials

import (
	m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
	controller "gitlab.com/mbugroup/lti-api.git/internal/modules/finance/initials/controllers"
	initial "gitlab.com/mbugroup/lti-api.git/internal/modules/finance/initials/services"
	user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"

	"github.com/gofiber/fiber/v2"
)

func InitialRoutes(v1 fiber.Router, u user.UserService, s initial.InitialService) {
	ctrl := controller.NewInitialController(s)

	route := v1.Group("/initial-balances")
	route.Use(m.Auth(u))

	route.Post("/",m.RequirePermissions(m.P_Finances_Initial_Balances_CreateOne), ctrl.CreateOne)
	route.Get("/:id",m.RequirePermissions(m.P_Finances_Initial_Balances_GetOne), ctrl.GetOne)
	route.Patch("/:id",m.RequirePermissions(m.P_Finances_Initial_Balances_UpdateOne), ctrl.UpdateOne)
}
