From 3ad506f8696c7297aaa83fe1431c765e0e0c00da Mon Sep 17 00:00:00 2001 From: Cristiano Date: Thu, 20 Nov 2025 16:33:56 +0100 Subject: [PATCH] Retired /api in all the endpoints --- .../Endpoints/Deliverers/CreateDelivererEndpoint.cs | 2 +- .../Endpoints/Deliverers/DeleteDelivererEndpoint.cs | 2 +- .../Endpoints/Deliverers/GetAllDelivererEndpoint.cs | 2 +- .../Endpoints/Deliverers/GetDelivererEndpoint.cs | 2 +- .../Endpoints/Deliverers/UpdateDelivererEndpoint.cs | 2 +- .../DeliveryNotes/CreateDeliveryNoteEndpoint.cs | 2 +- .../DeliveryNotes/GetAllDeliveryNoteEndpoint.cs | 2 +- .../DeliveryNotes/GetDeliveryNoteEndpoint.cs | 2 +- .../DeliveryNotes/PatchRealDeliveryDateEndpoint.cs | 2 +- PyroFetes/Endpoints/Prices/CreatePriceEndpoint.cs | 2 +- PyroFetes/Endpoints/Prices/DeletePriceEndpoint.cs | 2 +- PyroFetes/Endpoints/Prices/PatchPriceEndpoint.cs | 2 +- .../Endpoints/Products/GetAllProductsEndpoint.cs | 2 +- PyroFetes/Endpoints/Products/GetProductEndpoint.cs | 2 +- .../Products/PatchProductMinimalStockEndpoint.cs | 2 +- .../Endpoints/Products/UpdateProductEndpoint.cs | 2 +- .../PurchaseOrders/DeletePurchaseOrderEndpoint.cs | 2 +- .../PurchaseOrders/GetAllPurchaseOrderEndpoint.cs | 2 +- .../PurchaseOrders/GetPurchaseOrderEndpoint.cs | 2 +- .../PatchPurchaseOrderPurchaseConditionsEndpoint.cs | 2 +- .../CreatePurchaseProductEndpoint.cs | 2 +- .../DeletePurchaseProductEndpoint.cs | 2 +- .../PatchPurchaseProductQuantityEndpoint.cs | 2 +- .../CreateQuotationProductEndpoint.cs | 2 +- .../DeleteQuotationProductEndpoint.cs | 2 +- .../PatchQuotationProductQuantityEndpoint.cs | 2 +- .../Endpoints/Quotations/DeleteQuotationEndpoint.cs | 2 +- .../Endpoints/Quotations/GetAllQuotationEndpoint.cs | 2 +- .../Endpoints/Quotations/GetQuotationEndpoint.cs | 2 +- .../PatchQuotationConditionsSaleEndpoint.cs | 2 +- .../Endpoints/Settings/CreateSettingEndpoint.cs | 2 +- .../Endpoints/Settings/DeleteSettingEndpoint.cs | 2 +- PyroFetes/Endpoints/Settings/GetSettingEndpoint.cs | 2 +- .../PatchSettingElectronicSignatureEndpoint.cs | 2 +- .../Endpoints/Settings/PatchSettingLogoEndpoint.cs | 2 +- .../Endpoints/Suppliers/CreateSupplierEndpoint.cs | 2 +- .../Endpoints/Suppliers/DeleteSupplierEndpoint.cs | 2 +- .../Endpoints/Suppliers/GetAllSuppliersEndpoint.cs | 2 +- PyroFetes/Endpoints/Suppliers/GetSupplierEndpoint.cs | 2 +- ...oint.cs => PatchSupplierDeliveryDelayEndpoint.cs} | 4 ++-- .../Endpoints/Suppliers/UpdateSupplierEndpoint.cs | 2 +- PyroFetes/Endpoints/Users/ConnectUserEndpoint.cs | 2 +- PyroFetes/Endpoints/Users/CreateUserEndpoint.cs | 2 +- PyroFetes/Endpoints/Users/DeleteUserEndpoint.cs | 2 +- PyroFetes/Endpoints/Users/GetAllUsersEndpoint.cs | 2 +- PyroFetes/Endpoints/Users/GetUserEndpoint.cs | 2 +- .../Endpoints/Users/PatchUserPasswordEndpoint.cs | 2 +- PyroFetes/Endpoints/Users/UpdateUserEndpoint.cs | 2 +- .../WareHouseProducts/GetTotalQuantityEndpoint.cs | 2 +- .../PatchWareHouseProductQuantityEndpoint.cs | 12 ++++++++---- 50 files changed, 58 insertions(+), 54 deletions(-) rename PyroFetes/Endpoints/Suppliers/{PatchSupplierDeleveryDelayEndpoint.cs => PatchSupplierDeliveryDelayEndpoint.cs} (89%) diff --git a/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs index 16502ac..4eabfa5 100644 --- a/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs @@ -12,7 +12,7 @@ public class CreateDelivererEndpoint( { public override void Configure() { - Post("api/deliverers"); + Post("/deliverers"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Deliverers/DeleteDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/DeleteDelivererEndpoint.cs index 363e41f..a2981fe 100644 --- a/PyroFetes/Endpoints/Deliverers/DeleteDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/DeleteDelivererEndpoint.cs @@ -13,7 +13,7 @@ public class DeleteDelivererEndpoint(DeliverersRepository deliverersRepository) { public override void Configure() { - Delete("api/deliverers/{@id}", x=>new {x.DelivererId}); + Delete("/deliverers/{@id}", x=>new {x.DelivererId}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs index 5fa4372..5710628 100644 --- a/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/GetAllDelivererEndpoint.cs @@ -10,7 +10,7 @@ public class GetAllDelivererEndpoint(DeliverersRepository deliverersRepository) { public override void Configure() { - Get("api/deliverers"); + Get("/deliverers"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs index 2cbd731..22a027f 100644 --- a/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/GetDelivererEndpoint.cs @@ -18,7 +18,7 @@ public class GetDelivererEndpoint( { public override void Configure() { - Get("api/deliverers/{@id}", x=>new {x.DelivererId}); + Get("/deliverers/{@id}", x=>new {x.DelivererId}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs index 33df25b..ebf153e 100644 --- a/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs +++ b/PyroFetes/Endpoints/Deliverers/UpdateDelivererEndpoint.cs @@ -14,7 +14,7 @@ public class UpdateDelivererEndpoint( { public override void Configure() { - Put("api/deliverers/{@id}", x=>new {x.Id}); + Put("/deliverers/{@id}", x=>new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/DeliveryNotes/CreateDeliveryNoteEndpoint.cs b/PyroFetes/Endpoints/DeliveryNotes/CreateDeliveryNoteEndpoint.cs index 1e2c0f3..63d3103 100644 --- a/PyroFetes/Endpoints/DeliveryNotes/CreateDeliveryNoteEndpoint.cs +++ b/PyroFetes/Endpoints/DeliveryNotes/CreateDeliveryNoteEndpoint.cs @@ -17,7 +17,7 @@ public class CreateDeliveryNoteEndpoint( { public override void Configure() { - Post("/api/DeliveryNote"); + Post("/deliveryNotes"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/DeliveryNotes/GetAllDeliveryNoteEndpoint.cs b/PyroFetes/Endpoints/DeliveryNotes/GetAllDeliveryNoteEndpoint.cs index 879b7b6..7e126b8 100644 --- a/PyroFetes/Endpoints/DeliveryNotes/GetAllDeliveryNoteEndpoint.cs +++ b/PyroFetes/Endpoints/DeliveryNotes/GetAllDeliveryNoteEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllDeliveryNoteEndpoint(DeliveryNotesRepository deliveryNotesRep { public override void Configure() { - Get("api/deliveryNotes"); + Get("/deliveryNotes"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/DeliveryNotes/GetDeliveryNoteEndpoint.cs b/PyroFetes/Endpoints/DeliveryNotes/GetDeliveryNoteEndpoint.cs index 98eb447..90f3387 100644 --- a/PyroFetes/Endpoints/DeliveryNotes/GetDeliveryNoteEndpoint.cs +++ b/PyroFetes/Endpoints/DeliveryNotes/GetDeliveryNoteEndpoint.cs @@ -16,7 +16,7 @@ public class GetDeliveryNoteEndpoint( { public override void Configure() { - Get("/api/deliveryNote/{@id}", x=> new {x.DeliveryNoteId}); + Get("/deliveryNotes/{@id}", x=> new {x.DeliveryNoteId}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/DeliveryNotes/PatchRealDeliveryDateEndpoint.cs b/PyroFetes/Endpoints/DeliveryNotes/PatchRealDeliveryDateEndpoint.cs index d47d639..bad22b7 100644 --- a/PyroFetes/Endpoints/DeliveryNotes/PatchRealDeliveryDateEndpoint.cs +++ b/PyroFetes/Endpoints/DeliveryNotes/PatchRealDeliveryDateEndpoint.cs @@ -15,7 +15,7 @@ public class PatchRealDeliveryDateEndpoint( { public override void Configure() { - Patch("/api/deliveryNote/{@id}", x=> new {x.Id}); + Patch("/deliveryNotes/{@id}", x=> new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Prices/CreatePriceEndpoint.cs b/PyroFetes/Endpoints/Prices/CreatePriceEndpoint.cs index 3a71e9c..5445c0d 100644 --- a/PyroFetes/Endpoints/Prices/CreatePriceEndpoint.cs +++ b/PyroFetes/Endpoints/Prices/CreatePriceEndpoint.cs @@ -17,7 +17,7 @@ public class CreatePriceEndpoint( { public override void Configure() { - Post("/api/prices"); + Post("/prices"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Prices/DeletePriceEndpoint.cs b/PyroFetes/Endpoints/Prices/DeletePriceEndpoint.cs index 260c7cb..6ff6577 100644 --- a/PyroFetes/Endpoints/Prices/DeletePriceEndpoint.cs +++ b/PyroFetes/Endpoints/Prices/DeletePriceEndpoint.cs @@ -16,7 +16,7 @@ public class DeletePriceEndpoint(PricesRepository pricesRepository) : Endpoint new {x.ProductId, x.SupplierId}); + Delete("/prices/{@ProductId}/{@SupplierId}", x => new {x.ProductId, x.SupplierId}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Prices/PatchPriceEndpoint.cs b/PyroFetes/Endpoints/Prices/PatchPriceEndpoint.cs index 39927ba..23cb247 100644 --- a/PyroFetes/Endpoints/Prices/PatchPriceEndpoint.cs +++ b/PyroFetes/Endpoints/Prices/PatchPriceEndpoint.cs @@ -13,7 +13,7 @@ public class PatchPriceEndpoint( { public override void Configure() { - Patch("/api/prices/{@ProductId}/{@SupplierId}/SellingPrice", x => new { x.ProductId, x.SupplierId }); + Patch("/prices/{@ProductId}/{@SupplierId}/SellingPrice", x => new { x.ProductId, x.SupplierId }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Products/GetAllProductsEndpoint.cs b/PyroFetes/Endpoints/Products/GetAllProductsEndpoint.cs index 46b6c7d..6b4f2e0 100644 --- a/PyroFetes/Endpoints/Products/GetAllProductsEndpoint.cs +++ b/PyroFetes/Endpoints/Products/GetAllProductsEndpoint.cs @@ -10,7 +10,7 @@ public class GetAllProductsEndpoint(ProductsRepository productsRepository) : End { public override void Configure() { - Get("/api/products"); + Get("/products"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Products/GetProductEndpoint.cs b/PyroFetes/Endpoints/Products/GetProductEndpoint.cs index 7e458a3..705f5d2 100644 --- a/PyroFetes/Endpoints/Products/GetProductEndpoint.cs +++ b/PyroFetes/Endpoints/Products/GetProductEndpoint.cs @@ -18,7 +18,7 @@ public class GetProductEndpoint( { public override void Configure() { - Get("/api/products/{@Id}", x => new {x.Id}); + Get("/products/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Products/PatchProductMinimalStockEndpoint.cs b/PyroFetes/Endpoints/Products/PatchProductMinimalStockEndpoint.cs index 51bfd1d..6d2cf8b 100644 --- a/PyroFetes/Endpoints/Products/PatchProductMinimalStockEndpoint.cs +++ b/PyroFetes/Endpoints/Products/PatchProductMinimalStockEndpoint.cs @@ -14,7 +14,7 @@ public class PatchProductMinimalStockEndpoint( { public override void Configure() { - Patch("/api/products/{@Id}/MinimalStock", x => new { x.Id }); + Patch("/products/{@Id}/MinimalStock", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Products/UpdateProductEndpoint.cs b/PyroFetes/Endpoints/Products/UpdateProductEndpoint.cs index 83df9ac..0b37aa9 100644 --- a/PyroFetes/Endpoints/Products/UpdateProductEndpoint.cs +++ b/PyroFetes/Endpoints/Products/UpdateProductEndpoint.cs @@ -14,7 +14,7 @@ public class UpdateProductEndpoint( { public override void Configure() { - Put("/api/products/{@Id}", x => new {x.Id}); + Put("/products/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseOrders/DeletePurchaseOrderEndpoint.cs b/PyroFetes/Endpoints/PurchaseOrders/DeletePurchaseOrderEndpoint.cs index 23098d8..580efb6 100644 --- a/PyroFetes/Endpoints/PurchaseOrders/DeletePurchaseOrderEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseOrders/DeletePurchaseOrderEndpoint.cs @@ -17,7 +17,7 @@ public class DeletePurchaseOrderEndpoint( { public override void Configure() { - Delete("/api/purchaseOrders/{@Id}", x => new {x.Id}); + Delete("/purchaseOrders/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseOrders/GetAllPurchaseOrderEndpoint.cs b/PyroFetes/Endpoints/PurchaseOrders/GetAllPurchaseOrderEndpoint.cs index f60fc95..4bfd012 100644 --- a/PyroFetes/Endpoints/PurchaseOrders/GetAllPurchaseOrderEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseOrders/GetAllPurchaseOrderEndpoint.cs @@ -10,7 +10,7 @@ public class GetAllPurchaseOrderEndpoint(PurchaseOrdersRepository purchaseOrders { public override void Configure() { - Get("/api/purchaseOrders"); + Get("/purchaseOrders"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseOrders/GetPurchaseOrderEndpoint.cs b/PyroFetes/Endpoints/PurchaseOrders/GetPurchaseOrderEndpoint.cs index 16823ed..2b66aee 100644 --- a/PyroFetes/Endpoints/PurchaseOrders/GetPurchaseOrderEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseOrders/GetPurchaseOrderEndpoint.cs @@ -19,7 +19,7 @@ public class GetPurchaseOrderEndpoint( { public override void Configure() { - Get("/api/purchaseOrders/{@Id}", x => new {x.Id}); + Get("/purchaseOrders/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseOrders/PatchPurchaseOrderPurchaseConditionsEndpoint.cs b/PyroFetes/Endpoints/PurchaseOrders/PatchPurchaseOrderPurchaseConditionsEndpoint.cs index c422f4a..7b5c1f5 100644 --- a/PyroFetes/Endpoints/PurchaseOrders/PatchPurchaseOrderPurchaseConditionsEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseOrders/PatchPurchaseOrderPurchaseConditionsEndpoint.cs @@ -15,7 +15,7 @@ public class PatchPurchaseOrderPurchaseConditionsEndpoint( { public override void Configure() { - Patch("/api/purchaseOrders/{@Id}/PurchaseConditions", x => new { x.Id }); + Patch("/purchaseOrders/{@Id}/PurchaseConditions", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseProducts/CreatePurchaseProductEndpoint.cs b/PyroFetes/Endpoints/PurchaseProducts/CreatePurchaseProductEndpoint.cs index 73aa788..24fe1f7 100644 --- a/PyroFetes/Endpoints/PurchaseProducts/CreatePurchaseProductEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseProducts/CreatePurchaseProductEndpoint.cs @@ -17,7 +17,7 @@ public class CreatePurchaseProductEndpoint( { public override void Configure() { - Post("/api/purchaseProducts"); + Post("/purchaseProducts"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseProducts/DeletePurchaseProductEndpoint.cs b/PyroFetes/Endpoints/PurchaseProducts/DeletePurchaseProductEndpoint.cs index 811cade..7ce0dff 100644 --- a/PyroFetes/Endpoints/PurchaseProducts/DeletePurchaseProductEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseProducts/DeletePurchaseProductEndpoint.cs @@ -16,7 +16,7 @@ public class DeletePurchaseProductEndpoint(PurchaseProductsRepository purchasePr { public override void Configure() { - Delete("/api/purchaseProducts/{@ProductId}/{@PurchaseOrderId}", x => new {x.ProductId, x.PurchaseOrderId}); + Delete("/purchaseProducts/{@ProductId}/{@PurchaseOrderId}", x => new {x.ProductId, x.PurchaseOrderId}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/PurchaseProducts/PatchPurchaseProductQuantityEndpoint.cs b/PyroFetes/Endpoints/PurchaseProducts/PatchPurchaseProductQuantityEndpoint.cs index 17a88c4..d1aad89 100644 --- a/PyroFetes/Endpoints/PurchaseProducts/PatchPurchaseProductQuantityEndpoint.cs +++ b/PyroFetes/Endpoints/PurchaseProducts/PatchPurchaseProductQuantityEndpoint.cs @@ -14,7 +14,7 @@ public class PatchPurchaseProductQuantityEndpoint( { public override void Configure() { - Patch("/api/purchaseProducts/{@ProductId}/{@PurchaseOrderId}/Quantity", x => new { x.ProductId, x.PurchaseOrderId }); + Patch("/purchaseProducts/{@ProductId}/{@PurchaseOrderId}/Quantity", x => new { x.ProductId, x.PurchaseOrderId }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/QuotationProducts/CreateQuotationProductEndpoint.cs b/PyroFetes/Endpoints/QuotationProducts/CreateQuotationProductEndpoint.cs index 0c64357..2c13b2e 100644 --- a/PyroFetes/Endpoints/QuotationProducts/CreateQuotationProductEndpoint.cs +++ b/PyroFetes/Endpoints/QuotationProducts/CreateQuotationProductEndpoint.cs @@ -17,7 +17,7 @@ public class CreateQuotationProductEndpoint( { public override void Configure() { - Post("/api/quotationProduct"); + Post("/quotationProducts"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/QuotationProducts/DeleteQuotationProductEndpoint.cs b/PyroFetes/Endpoints/QuotationProducts/DeleteQuotationProductEndpoint.cs index c680325..554ccd4 100644 --- a/PyroFetes/Endpoints/QuotationProducts/DeleteQuotationProductEndpoint.cs +++ b/PyroFetes/Endpoints/QuotationProducts/DeleteQuotationProductEndpoint.cs @@ -16,7 +16,7 @@ public class DeleteQuotationProductEndpoint(QuotationProductsRepository quotatio { public override void Configure() { - Delete("/api/quotationProduct/{@ProductId}/{@QuotationId}", x => new {x.ProductId, x.QuotationId}); + Delete("/quotationProducts/{@ProductId}/{@QuotationId}", x => new {x.ProductId, x.QuotationId}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/QuotationProducts/PatchQuotationProductQuantityEndpoint.cs b/PyroFetes/Endpoints/QuotationProducts/PatchQuotationProductQuantityEndpoint.cs index 26f3691..de8546e 100644 --- a/PyroFetes/Endpoints/QuotationProducts/PatchQuotationProductQuantityEndpoint.cs +++ b/PyroFetes/Endpoints/QuotationProducts/PatchQuotationProductQuantityEndpoint.cs @@ -14,7 +14,7 @@ public class PatchQuotationProductQuantityEndpoint( { public override void Configure() { - Patch("/api/quotationProduct/{@ProductId}/{@QuotationId}/Quantity", x => new { x.ProductId, x.QuotationId }); + Patch("/quotationProducts/{@ProductId}/{@QuotationId}/Quantity", x => new { x.ProductId, x.QuotationId }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Quotations/DeleteQuotationEndpoint.cs b/PyroFetes/Endpoints/Quotations/DeleteQuotationEndpoint.cs index 06ef33c..80df36c 100644 --- a/PyroFetes/Endpoints/Quotations/DeleteQuotationEndpoint.cs +++ b/PyroFetes/Endpoints/Quotations/DeleteQuotationEndpoint.cs @@ -17,7 +17,7 @@ public class DeleteQuotationEndpoint( { public override void Configure() { - Delete("/api/quotations/{@Id}", x => new {x.Id}); + Delete("/quotations/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Quotations/GetAllQuotationEndpoint.cs b/PyroFetes/Endpoints/Quotations/GetAllQuotationEndpoint.cs index d6f3acf..b4674f3 100644 --- a/PyroFetes/Endpoints/Quotations/GetAllQuotationEndpoint.cs +++ b/PyroFetes/Endpoints/Quotations/GetAllQuotationEndpoint.cs @@ -11,7 +11,7 @@ public class GetAllQuotationEndpoint(QuotationsRepository quotationsRepository) { public override void Configure() { - Get("/api/quotations"); + Get("/quotations"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Quotations/GetQuotationEndpoint.cs b/PyroFetes/Endpoints/Quotations/GetQuotationEndpoint.cs index 6c2355b..bdc57c2 100644 --- a/PyroFetes/Endpoints/Quotations/GetQuotationEndpoint.cs +++ b/PyroFetes/Endpoints/Quotations/GetQuotationEndpoint.cs @@ -19,7 +19,7 @@ public class GetQuotationEndpoint( { public override void Configure() { - Get("/api/quotations/{@Id}", x => new {x.Id}); + Get("/quotations/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Quotations/PatchQuotationConditionsSaleEndpoint.cs b/PyroFetes/Endpoints/Quotations/PatchQuotationConditionsSaleEndpoint.cs index c68d1e9..a21f60d 100644 --- a/PyroFetes/Endpoints/Quotations/PatchQuotationConditionsSaleEndpoint.cs +++ b/PyroFetes/Endpoints/Quotations/PatchQuotationConditionsSaleEndpoint.cs @@ -15,7 +15,7 @@ public class PatchQuotationConditionsSaleEndpoint( { public override void Configure() { - Patch("/api/quotations/{@Id}/ConditionsSale", x => new { x.Id }); + Patch("/quotations/{@Id}/saleConditions", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Settings/CreateSettingEndpoint.cs b/PyroFetes/Endpoints/Settings/CreateSettingEndpoint.cs index 0a6f1dd..893996b 100644 --- a/PyroFetes/Endpoints/Settings/CreateSettingEndpoint.cs +++ b/PyroFetes/Endpoints/Settings/CreateSettingEndpoint.cs @@ -12,7 +12,7 @@ public class CreateSettingEndpoint( { public override void Configure() { - Post("/api/setting"); + Post("/settings"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Settings/DeleteSettingEndpoint.cs b/PyroFetes/Endpoints/Settings/DeleteSettingEndpoint.cs index f608259..2979b01 100644 --- a/PyroFetes/Endpoints/Settings/DeleteSettingEndpoint.cs +++ b/PyroFetes/Endpoints/Settings/DeleteSettingEndpoint.cs @@ -15,7 +15,7 @@ public class DeleteSettingEndpoint(SettingsRepository settingsRepository) : Endp { public override void Configure() { - Delete("/api/setting/{@Id}", x => new {x.Id}); + Delete("/settings/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Settings/GetSettingEndpoint.cs b/PyroFetes/Endpoints/Settings/GetSettingEndpoint.cs index a2a2638..1735008 100644 --- a/PyroFetes/Endpoints/Settings/GetSettingEndpoint.cs +++ b/PyroFetes/Endpoints/Settings/GetSettingEndpoint.cs @@ -18,7 +18,7 @@ public class GetSettingEndpoint( { public override void Configure() { - Get("/api/setting/{@Id}", x => new {x.Id}); + Get("/settings/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Settings/PatchSettingElectronicSignatureEndpoint.cs b/PyroFetes/Endpoints/Settings/PatchSettingElectronicSignatureEndpoint.cs index 4e54c0e..ca73c8c 100644 --- a/PyroFetes/Endpoints/Settings/PatchSettingElectronicSignatureEndpoint.cs +++ b/PyroFetes/Endpoints/Settings/PatchSettingElectronicSignatureEndpoint.cs @@ -14,7 +14,7 @@ public class PatchSettingElectronicSignatureEndpoint( { public override void Configure() { - Patch("/api/setting/{@Id}/ElectronicSignature", x => new {x.Id}); + Patch("/settings/{@Id}/ElectronicSignature", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Settings/PatchSettingLogoEndpoint.cs b/PyroFetes/Endpoints/Settings/PatchSettingLogoEndpoint.cs index 99ff25a..f180cbc 100644 --- a/PyroFetes/Endpoints/Settings/PatchSettingLogoEndpoint.cs +++ b/PyroFetes/Endpoints/Settings/PatchSettingLogoEndpoint.cs @@ -14,7 +14,7 @@ public class PatchSettingLogoEndpoint( { public override void Configure() { - Patch("/api/setting/{@Id}/Logo", x => new {x.Id}); + Patch("/settings/{@Id}/logo", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Suppliers/CreateSupplierEndpoint.cs b/PyroFetes/Endpoints/Suppliers/CreateSupplierEndpoint.cs index 19f674c..afd95f2 100644 --- a/PyroFetes/Endpoints/Suppliers/CreateSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Suppliers/CreateSupplierEndpoint.cs @@ -12,7 +12,7 @@ public class CreateSupplierEndpoint( { public override void Configure() { - Post("/api/suppliers"); + Post("/suppliers"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Suppliers/DeleteSupplierEndpoint.cs b/PyroFetes/Endpoints/Suppliers/DeleteSupplierEndpoint.cs index 4aaef71..6786015 100644 --- a/PyroFetes/Endpoints/Suppliers/DeleteSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Suppliers/DeleteSupplierEndpoint.cs @@ -15,7 +15,7 @@ public class DeleteSupplierEndpoint(SuppliersRepository suppliersRepository) : E { public override void Configure() { - Delete("/api/suppliers/{@Id}", x => new {x.Id}); + Delete("/suppliers/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Suppliers/GetAllSuppliersEndpoint.cs b/PyroFetes/Endpoints/Suppliers/GetAllSuppliersEndpoint.cs index e9b1d10..3c655f8 100644 --- a/PyroFetes/Endpoints/Suppliers/GetAllSuppliersEndpoint.cs +++ b/PyroFetes/Endpoints/Suppliers/GetAllSuppliersEndpoint.cs @@ -9,7 +9,7 @@ public class GetAllSuppliersEndpoint(SuppliersRepository suppliersRepository) : { public override void Configure() { - Get("/api/suppliers"); + Get("/suppliers"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Suppliers/GetSupplierEndpoint.cs b/PyroFetes/Endpoints/Suppliers/GetSupplierEndpoint.cs index 7c6377a..50fbb54 100644 --- a/PyroFetes/Endpoints/Suppliers/GetSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Suppliers/GetSupplierEndpoint.cs @@ -18,7 +18,7 @@ public class GetSupplierEndpoint( { public override void Configure() { - Get("/api/suppliers/{@Id}", x => new {x.Id}); + Get("/suppliers/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Suppliers/PatchSupplierDeleveryDelayEndpoint.cs b/PyroFetes/Endpoints/Suppliers/PatchSupplierDeliveryDelayEndpoint.cs similarity index 89% rename from PyroFetes/Endpoints/Suppliers/PatchSupplierDeleveryDelayEndpoint.cs rename to PyroFetes/Endpoints/Suppliers/PatchSupplierDeliveryDelayEndpoint.cs index f4ece04..0a83253 100644 --- a/PyroFetes/Endpoints/Suppliers/PatchSupplierDeleveryDelayEndpoint.cs +++ b/PyroFetes/Endpoints/Suppliers/PatchSupplierDeliveryDelayEndpoint.cs @@ -8,13 +8,13 @@ using PyroFetes.Specifications.Suppliers; namespace PyroFetes.Endpoints.Suppliers; -public class PatchSupplierDeleveryDelayEndpoint( +public class PatchSupplierDeliveryDelayEndpoint( SuppliersRepository suppliersRepository, AutoMapper.IMapper mapper) : Endpoint { public override void Configure() { - Patch("/api/supplier/{@Id}/DeleveryDalay", x => new {x.Id}); + Patch("/suppliers/{@Id}/deliveryDelay", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Suppliers/UpdateSupplierEndpoint.cs b/PyroFetes/Endpoints/Suppliers/UpdateSupplierEndpoint.cs index 0ef1516..79206ce 100644 --- a/PyroFetes/Endpoints/Suppliers/UpdateSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Suppliers/UpdateSupplierEndpoint.cs @@ -14,7 +14,7 @@ public class UpdateSupplierEndpoint( { public override void Configure() { - Put("/api/suppliers/{@Id}", x => new {x.Id}); + Put("/suppliers/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Users/ConnectUserEndpoint.cs b/PyroFetes/Endpoints/Users/ConnectUserEndpoint.cs index 916f41e..07e6eaa 100644 --- a/PyroFetes/Endpoints/Users/ConnectUserEndpoint.cs +++ b/PyroFetes/Endpoints/Users/ConnectUserEndpoint.cs @@ -13,7 +13,7 @@ public class ConnectUserEndpoint(UsersRepository usersRepository) : Endpoint new {x.Id}); + Delete("/users/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Users/GetAllUsersEndpoint.cs b/PyroFetes/Endpoints/Users/GetAllUsersEndpoint.cs index 0cf1e78..6a36ca9 100644 --- a/PyroFetes/Endpoints/Users/GetAllUsersEndpoint.cs +++ b/PyroFetes/Endpoints/Users/GetAllUsersEndpoint.cs @@ -9,7 +9,7 @@ public class GetAllUsersEndpoint(UsersRepository usersRepository) : EndpointWith { public override void Configure() { - Get("/api/users"); + Get("/users"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Users/GetUserEndpoint.cs b/PyroFetes/Endpoints/Users/GetUserEndpoint.cs index 222079d..a03e04f 100644 --- a/PyroFetes/Endpoints/Users/GetUserEndpoint.cs +++ b/PyroFetes/Endpoints/Users/GetUserEndpoint.cs @@ -18,7 +18,7 @@ public class GetUserEndpoint( { public override void Configure() { - Get("/api/users/{@Id}", x => new {x.Id}); + Get("/users/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Users/PatchUserPasswordEndpoint.cs b/PyroFetes/Endpoints/Users/PatchUserPasswordEndpoint.cs index 6f7491e..1647bd4 100644 --- a/PyroFetes/Endpoints/Users/PatchUserPasswordEndpoint.cs +++ b/PyroFetes/Endpoints/Users/PatchUserPasswordEndpoint.cs @@ -14,7 +14,7 @@ public class PatchUserPasswordEndpoint( { public override void Configure() { - Patch("/api/users/{@Id}/Password", x => new { x.Id }); + Patch("/users/{@Id}/password", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Users/UpdateUserEndpoint.cs b/PyroFetes/Endpoints/Users/UpdateUserEndpoint.cs index cf5f8d6..b50439d 100644 --- a/PyroFetes/Endpoints/Users/UpdateUserEndpoint.cs +++ b/PyroFetes/Endpoints/Users/UpdateUserEndpoint.cs @@ -15,7 +15,7 @@ public class UpdateUserEndpoint( { public override void Configure() { - Put("/api/users/{@Id}", x => new {x.Id}); + Put("/users/{@Id}", x => new {x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/WareHouseProducts/GetTotalQuantityEndpoint.cs b/PyroFetes/Endpoints/WareHouseProducts/GetTotalQuantityEndpoint.cs index 2a5c8a8..6df7fd9 100644 --- a/PyroFetes/Endpoints/WareHouseProducts/GetTotalQuantityEndpoint.cs +++ b/PyroFetes/Endpoints/WareHouseProducts/GetTotalQuantityEndpoint.cs @@ -17,7 +17,7 @@ public class GetTotalQuantityEndpoint( { public override void Configure() { - Get("/api/wareHouseProduct/{@ProductId}", x => new { x.ProductId }); + Get("/wareHouseProducts/{@ProductId}", x => new { x.ProductId }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/WareHouseProducts/PatchWareHouseProductQuantityEndpoint.cs b/PyroFetes/Endpoints/WareHouseProducts/PatchWareHouseProductQuantityEndpoint.cs index 5426645..93a4e07 100644 --- a/PyroFetes/Endpoints/WareHouseProducts/PatchWareHouseProductQuantityEndpoint.cs +++ b/PyroFetes/Endpoints/WareHouseProducts/PatchWareHouseProductQuantityEndpoint.cs @@ -6,23 +6,27 @@ using PyroFetes.Models; namespace PyroFetes.Endpoints.WareHouseProducts; -public class PatchWareHouseProductQuantityEndpoint(PyroFetesDbContext database) : Endpoint +public class PatchWareHouseProductQuantityEndpoint(PyroFetesDbContext database) + : Endpoint { public override void Configure() { - Patch("/api/wareHouseProduct/{@ProductId}/{@WareHouseId}/Quantity", x => new { x.ProductId, x.WareHouseId }); + Patch("/wareHouseProducts/{@ProductId}/{@WareHouseId}/quantity", x => new { x.ProductId, x.WareHouseId }); AllowAnonymous(); } public override async Task HandleAsync(PatchWareHouseProductQuantityDto req, CancellationToken ct) { - WarehouseProduct? wareHouseProduct = await database.WarehouseProducts.SingleOrDefaultAsync(wp => wp.ProductId == req.ProductId && wp.WarehouseId == req.WareHouseId, ct); + WarehouseProduct? wareHouseProduct = + await database.WarehouseProducts.SingleOrDefaultAsync( + wp => wp.ProductId == req.ProductId && wp.WarehouseId == req.WareHouseId, ct); + if (wareHouseProduct == null) { await Send.NotFoundAsync(ct); return; } - + wareHouseProduct.Quantity = req.Quantity; await database.SaveChangesAsync(ct);