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:
@@ -109,7 +109,7 @@ func (s *chickinService) CreateOne(c *fiber.Ctx, req *validation.Create) (*entit
|
||||
return nil, err
|
||||
}
|
||||
|
||||
projectflockkandang, err := s.ProjectflockKandangRepo.GetByID(c.Context(), 1)
|
||||
projectflockkandang, err := s.ProjectflockKandangRepo.GetByID(c.Context(), req.ProjectFlockKandangId)
|
||||
if err != nil {
|
||||
s.Log.Errorf("Failed to get projectflock kandang: %+v", err)
|
||||
return nil, err
|
||||
@@ -154,7 +154,7 @@ func (s *chickinService) CreateOne(c *fiber.Ctx, req *validation.Create) (*entit
|
||||
return nil, fiber.NewError(fiber.StatusBadRequest, "Invalid ChickInDate format")
|
||||
}
|
||||
newChickin := &entity.ProjectChickin{
|
||||
ProjectFlockKandangId: projectflockkandang.ProjectFlockId,
|
||||
ProjectFlockKandangId: projectflockkandang.Id,
|
||||
ChickInDate: chickinDate,
|
||||
Quantity: totalQuantity,
|
||||
Note: "",
|
||||
|
||||
Reference in New Issue
Block a user