package dashboards

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

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

func DashboardRoutes(v1 fiber.Router, u user.UserService, s dashboard.DashboardService) {
	ctrl := controller.NewDashboardController(s)

	route := v1.Group("/dashboards")
	route.Use(m.Auth(u))
	route.Get("/",m.RequirePermissions(m.P_DashboardGetAll) ,ctrl.GetAll)
}
