Feat(BE-36,37,38,39): finish master data management api

This commit is contained in:
Hafizh A. Y
2025-10-03 21:04:21 +07:00
parent e8905be856
commit 2d49ffe4cd
103 changed files with 6974 additions and 117 deletions
@@ -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)
}