package systemsettings

import (
	"github.com/gofiber/fiber/v2"
	m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
	controller "gitlab.com/mbugroup/lti-api.git/internal/modules/system-settings/controllers"
	service "gitlab.com/mbugroup/lti-api.git/internal/modules/system-settings/services"
	userService "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
)

func SystemSettingRoutes(v1 fiber.Router, u userService.UserService, svc service.SystemSettingService) {
	ctrl := controller.NewSystemSettingController(svc)

	route := v1.Group("/system-settings")
	route.Use(m.Auth(u))

	route.Get("/", ctrl.GetAll)
	route.Patch("/allow-negative-pakan-ovk", m.RequirePermissions(m.P_SystemSettingUpdate), ctrl.SetAllowNegativePakanOVK)
}
