mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
Feat(BE-36,37,38,39): finish master data management api
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
repository "gitlab.com/mbugroup/lti-api.git/internal/modules/constants/repositories"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
type ConstantService interface {
|
||||
GetAll(ctx *fiber.Ctx) (map[string]interface{}, error)
|
||||
}
|
||||
|
||||
type constantService struct {
|
||||
Repository repository.ConstantRepository
|
||||
}
|
||||
|
||||
func NewConstantService(repo repository.ConstantRepository, validate *validator.Validate) ConstantService {
|
||||
return &constantService{
|
||||
Repository: repo,
|
||||
}
|
||||
}
|
||||
|
||||
func (s constantService) GetAll(c *fiber.Ctx) (map[string]interface{}, error) {
|
||||
return s.Repository.GetConstants(), nil
|
||||
}
|
||||
Reference in New Issue
Block a user