mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Merge branch 'feat/BE/Sprint-6' into 'dev/teguh' - merge all closing methods
This commit is contained in:
@@ -53,15 +53,15 @@ func (u *ClosingController) GetAll(c *fiber.Ctx) error {
|
||||
})
|
||||
}
|
||||
|
||||
func (u *ClosingController) GetOne(c *fiber.Ctx) error {
|
||||
param := c.Params("id")
|
||||
func (u *ClosingController) GetClosingSummary(c *fiber.Ctx) error {
|
||||
param := c.Params("projectFlockId")
|
||||
|
||||
id, err := strconv.Atoi(param)
|
||||
if err != nil {
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Invalid Id")
|
||||
if err != nil || id <= 0 {
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Invalid projectFlockId")
|
||||
}
|
||||
|
||||
result, err := u.ClosingService.GetOne(c, uint(id))
|
||||
result, err := u.ClosingService.GetClosingSummary(c, uint(id))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -70,8 +70,8 @@ func (u *ClosingController) GetOne(c *fiber.Ctx) error {
|
||||
JSON(response.Success{
|
||||
Code: fiber.StatusOK,
|
||||
Status: "success",
|
||||
Message: "Get closing successfully",
|
||||
Data: dto.ToClosingListDTO(*result),
|
||||
Message: "Retrieved project information successfully",
|
||||
Data: result,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user