mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
fixing report-counting-sapronak
This commit is contained in:
@@ -14,16 +14,14 @@ import (
|
||||
)
|
||||
|
||||
type ClosingController struct {
|
||||
ClosingService service.ClosingService
|
||||
SapronakService service.SapronakService
|
||||
SapronakFormatter service.SapronakFormatter
|
||||
ClosingService service.ClosingService
|
||||
SapronakService service.SapronakService
|
||||
}
|
||||
|
||||
func NewClosingController(closingService service.ClosingService, sapronakService service.SapronakService, sapronakFormatter service.SapronakFormatter) *ClosingController {
|
||||
func NewClosingController(closingService service.ClosingService, sapronakService service.SapronakService) *ClosingController {
|
||||
return &ClosingController{
|
||||
ClosingService: closingService,
|
||||
SapronakService: sapronakService,
|
||||
SapronakFormatter: sapronakFormatter,
|
||||
ClosingService: closingService,
|
||||
SapronakService: sapronakService,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +205,7 @@ func (u *ClosingController) GetSapronakByProject(c *fiber.Ctx) error {
|
||||
return err
|
||||
}
|
||||
|
||||
payload := u.SapronakFormatter.ProjectPayload(result, flag)
|
||||
payload := dto.ToSapronakProjectAggregatedFromReports(result, flag)
|
||||
|
||||
return c.Status(fiber.StatusOK).
|
||||
JSON(response.Success{
|
||||
@@ -237,7 +235,7 @@ func (u *ClosingController) GetSapronakByKandang(c *fiber.Ctx) error {
|
||||
return err
|
||||
}
|
||||
|
||||
payload := u.SapronakFormatter.KandangPayload(result, flag)
|
||||
payload := dto.ToSapronakProjectAggregatedFromReport(result, flag)
|
||||
|
||||
return c.Status(fiber.StatusOK).
|
||||
JSON(response.Success{
|
||||
|
||||
Reference in New Issue
Block a user