Cleaned code

This commit is contained in:
2026-05-24 17:24:44 +01:00
parent 656100d15e
commit 1434a5d77a
88 changed files with 197 additions and 213 deletions
@@ -11,7 +11,7 @@ namespace PyroFetes.Endpoints.Suppliers;
public class AddProductToSupplierEndpoint(
SuppliersRepository suppliersRepository,
ProductsRepository productsRepository,
PricesRepository pricesRepository,
PricesRepository pricesRepository,
AutoMapper.IMapper mapper) : Endpoint<CreatePriceDto>
{
public override void Configure()
@@ -36,7 +36,7 @@ public class AddProductToSupplierEndpoint(
await Send.StringAsync("Le fournisseur a déjà un prix pour ce produit.", 400, cancellation: ct);
return;
}
await pricesRepository.AddAsync(mapper.Map<Price>(req), ct);
await Send.NoContentAsync(ct);
}
@@ -27,7 +27,7 @@ public class PatchPriceEndpoint(
}
mapper.Map(req, price);
await pricesRepository.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}