diff --git a/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs b/PyroFetes/Endpoints/Deliverers/CreateDelivererEndpoint.cs index 16502ac8..4eabfa5c 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 363e41f2..a2981fe9 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 5fa43723..5710628f 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 2cbd7317..22a027f4 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 33df25b7..ebf153ef 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 1e2c0f38..63d3103f 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 879b7b6e..7e126b83 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 98eb447c..90f33874 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 d47d6397..bad22b72 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 3a71e9cc..5445c0db 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 260c7cb7..6ff65772 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 39927ba5..23cb247c 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 46b6c7d5..6b4f2e07 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 7e458a30..705f5d21 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 51bfd1d7..6d2cf8b0 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 83df9ac0..0b37aa9a 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 23098d8f..580efb65 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 f60fc956..4bfd0123 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 16823ed0..2b66aee6 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 c422f4ae..7b5c1f5f 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 73aa7886..24fe1f75 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 811cade7..7ce0dffb 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 17a88c41..d1aad89d 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 0c64357f..2c13b2e9 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 c6803256..554ccd4d 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 26f3691a..de8546ef 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 06ef33c6..80df36cf 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 d6f3acf9..b4674f30 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 6c2355b2..bdc57c21 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 c68d1e96..a21f60d4 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 0a6f1dd4..893996b9 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 f6082596..2979b019 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 a2a26385..17350084 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 4e54c0e3..ca73c8c5 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 99ff25a7..f180cbc7 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 19f674cb..afd95f21 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 4aaef713..67860154 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 e9b1d10f..3c655f8d 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 7c6377a8..50fbb54f 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 f4ece04d..0a832539 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 0ef15164..79206ce2 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 916f41ef..07e6eaaa 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 0cf1e78c..6a36ca98 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 222079d2..a03e04f6 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 6f7491e2..1647bd41 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 cf5f8d6c..b50439da 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 2a5c8a84..6df7fd91 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 54266455..93a4e07c 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);