fix error in api's route

This commit is contained in:
2025-10-17 16:47:34 +01:00
parent fa72c6d777
commit aa1c98d649
12 changed files with 33 additions and 23 deletions

View File

@@ -13,13 +13,13 @@ public class GetTotalQuantityEndpoint(PyroFetesDbContext database) : Endpoint<Ge
{
public override void Configure()
{
Get("/api/wareHouseProduct/{ProductId}", x => new { x.ProductId });
Get("/api/wareHouseProduct/{@ProductId}", x => new { x.ProductId });
AllowAnonymous();
}
public override async Task HandleAsync(GetTotalQuantityRequest req, CancellationToken ct)
{
bool exists = await database.WarehouseProducts
var exists = await database.WarehouseProducts
.AnyAsync(wp => wp.ProductId == req.ProductId, ct);
if (!exists)