mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Feat(BE-36,37,38,39): finish master data management api
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
service "gitlab.com/mbugroup/lti-api.git/internal/modules/constants/services"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
type ConstantController struct {
|
||||
ConstantService service.ConstantService
|
||||
}
|
||||
|
||||
func NewConstantController(constantService service.ConstantService) *ConstantController {
|
||||
return &ConstantController{
|
||||
ConstantService: constantService,
|
||||
}
|
||||
}
|
||||
|
||||
func (ctrl *ConstantController) GetAll(c *fiber.Ctx) error {
|
||||
data, err := ctrl.ConstantService.GetAll(c)
|
||||
if err != nil {
|
||||
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
||||
}
|
||||
return c.Status(fiber.StatusOK).JSON(data)
|
||||
}
|
||||
Reference in New Issue
Block a user