fix error in GetTotalQuantityEndpoint.cs

This commit is contained in:
2025-11-30 16:59:28 +01:00
parent 4a82c51133
commit d709654410

View File

@@ -31,9 +31,10 @@ public class GetTotalQuantityEndpoint(
return; return;
} }
int totalQuantity = int? totalQuantityNullable = await warehouseProductsRepository.
await warehouseProductsRepository.SumAsync(new GetProductTotalQuantitySpec(req.ProductId), SumAsync(new GetProductTotalQuantitySpec(req.ProductId), wp => wp.Quantity, ct);
wp => wp.Quantity, ct);
int totalQuantity = totalQuantityNullable ?? 0;
GetTotalQuantityDto responseDto = new() GetTotalQuantityDto responseDto = new()
{ {