FIX[BE]: delete redudant kandang response on projectflockkandang getone API

This commit is contained in:
aguhh18
2025-11-03 09:29:00 +07:00
parent 86f37a89c1
commit c72db5bd18
2 changed files with 1 additions and 17 deletions
@@ -115,20 +115,18 @@ func (s projectFlockKandangService) getAvailableQuantities(c *fiber.Ctx, project
var result []map[string]interface{}
for _, pw := range products {
if pw.Quantity > 0 {
// Build product data
productData := map[string]interface{}{
"id": pw.Product.Id,
"name": pw.Product.Name,
}
// Build warehouse data
warehouseData := map[string]interface{}{
"id": pw.Warehouse.Id,
"name": pw.Warehouse.Name,
"type": pw.Warehouse.Type,
}
// Build product warehouse data with nested product and warehouse
productWarehouseData := map[string]interface{}{
"id": pw.Id,
"quantity": pw.Quantity,