mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Revert "Revert "[FIX/BE-US]add feature restrict by location and areas in roles""
This reverts commit 26bf7f165e.
This commit is contained in:
@@ -17,10 +17,12 @@ import (
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type DashboardService interface {
|
||||
GetAll(ctx context.Context, params *validation.Query) (dto.DashboardPerformanceOverviewDTO, int64, error)
|
||||
DB() *gorm.DB
|
||||
}
|
||||
|
||||
type dashboardService struct {
|
||||
@@ -37,6 +39,10 @@ func NewDashboardService(repo repository.DashboardRepository, validate *validato
|
||||
}
|
||||
}
|
||||
|
||||
func (s dashboardService) DB() *gorm.DB {
|
||||
return s.Repository.DB()
|
||||
}
|
||||
|
||||
func (s dashboardService) GetAll(ctx context.Context, params *validation.Query) (dto.DashboardPerformanceOverviewDTO, int64, error) {
|
||||
if err := s.Validate.Struct(params); err != nil {
|
||||
return dto.DashboardPerformanceOverviewDTO{}, 0, err
|
||||
|
||||
Reference in New Issue
Block a user