mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat[BE-117]: create lookup API in project flock to get projectFlocks kandang id
This commit is contained in:
@@ -244,3 +244,19 @@ func (u *ProjectflockController) GetFlockPeriodSummary(c *fiber.Ctx) error {
|
||||
Data: responseBody,
|
||||
})
|
||||
}
|
||||
|
||||
func (u *ProjectflockController) LookupProjectFlockKandang(c *fiber.Ctx) error {
|
||||
projectFlockIdStr := c.Query("project_flock_id", "")
|
||||
kandangIdStr := c.Query("kandang_id", "")
|
||||
|
||||
result, err := u.ProjectflockService.GetProjectFlockKandangByParams(c, "", projectFlockIdStr, kandangIdStr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Status(fiber.StatusOK).
|
||||
JSON(response.Success{Code: fiber.StatusOK,
|
||||
Status: "success",
|
||||
Message: "Get projectflock kandang successfully",
|
||||
Data: dto.ToProjectFlockKandangDTO(*result)})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user