Feat[BE] : add avaibility DOC on lookup porject flock API, add note request json on chickin

This commit is contained in:
aguhh18
2025-10-24 09:51:50 +07:00
parent 79b3dd47b8
commit aeeb5a38c1
8 changed files with 137 additions and 96 deletions
@@ -30,6 +30,10 @@ func (u *ProductWarehouseController) GetAll(c *fiber.Ctx) error {
WarehouseId: uint(c.QueryInt("warehouse_id", 0)),
}
if query.Page < 1 || query.Limit < 1 {
return fiber.NewError(fiber.StatusBadRequest, "page and limit must be greater than 0")
}
result, totalResults, err := u.ProductWarehouseService.GetAll(c, query)
if err != nil {
return err
@@ -71,5 +75,3 @@ func (u *ProductWarehouseController) GetOne(c *fiber.Ctx) error {
Data: dto.ToProductWarehouseListDTO(*result),
})
}