UPDATE: Fix bug
All checks were successful
Build and Release / release (push) Successful in 1m8s

This commit is contained in:
2026-04-27 20:31:01 +07:00
parent eb08c16232
commit 17aafacbfd
36 changed files with 842 additions and 447 deletions

View File

@@ -34,9 +34,9 @@ func (h *RoleController) GetRoleById(c fiber.Ctx) error {
RoleId := c.Params("id")
res, err := h.service.GetRoleByID(ctx, RoleId)
if err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(response.CommonResponse{
return c.Status(err.Code).JSON(response.CommonResponse{
Status: false,
Message: err.Error(),
Message: err.Message,
})
}
return c.Status(fiber.StatusOK).JSON(response.CommonResponse{
@@ -61,9 +61,9 @@ func (h *RoleController) GetAllRole(c fiber.Ctx) error {
defer cancel()
res, err := h.service.GetAllRole(ctx)
if err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(response.CommonResponse{
return c.Status(err.Code).JSON(response.CommonResponse{
Status: false,
Message: err.Error(),
Message: err.Message,
})
}
return c.Status(fiber.StatusOK).JSON(response.CommonResponse{