From 157719eae2f8b727644c4610abc507fe942d09ec Mon Sep 17 00:00:00 2001 From: colesm Date: Thu, 20 Nov 2025 14:10:54 +0100 Subject: [PATCH] MAJ routes d'api pour liaison avec front --- PyroFetes/Endpoints/Brand/CreateBrandEndpoint.cs | 2 +- PyroFetes/Endpoints/Brand/DeleteBrandEndpoint.cs | 2 +- PyroFetes/Endpoints/Brand/GetAllBrandsEndpoint.cs | 2 +- PyroFetes/Endpoints/Brand/GetBrandEndpoint.cs | 2 +- PyroFetes/Endpoints/Brand/UpdateBrandEndpoint.cs | 2 +- .../Endpoints/Classification/CreateClassificationEndpoint.cs | 2 +- .../Endpoints/Classification/DeleteClassificationEndpoint.cs | 2 +- .../Endpoints/Classification/GetAllClassificationsEndpoint.cs | 2 +- PyroFetes/Endpoints/Classification/GetClassificationEndpoint.cs | 2 +- .../Endpoints/Classification/UpdateClassificationEndpoint.cs | 2 +- PyroFetes/Endpoints/Color/CreateColorEndpoint.cs | 2 +- PyroFetes/Endpoints/Color/DeleteColorEndpoint.cs | 2 +- PyroFetes/Endpoints/Color/GetAllColorsEndpoint.cs | 2 +- PyroFetes/Endpoints/Color/GetColorEndpoint.cs | 2 +- PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs | 2 +- PyroFetes/Endpoints/Effect/CreateEffectEndpoint.cs | 2 +- PyroFetes/Endpoints/Effect/DeleteEffectEndpoint.cs | 2 +- PyroFetes/Endpoints/Effect/GetAllEffectsEndpoint.cs | 2 +- PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs | 2 +- PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs | 2 +- PyroFetes/Endpoints/Material/CreateMaterialEndpoint.cs | 2 +- PyroFetes/Endpoints/Material/GetAllMaterialsEndpoint.cs | 2 +- PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs | 2 +- PyroFetes/Endpoints/Material/UpdateMaterialEndpoint.cs | 2 +- PyroFetes/Endpoints/Movement/CreateMovementEndpoint.cs | 2 +- PyroFetes/Endpoints/Movement/DeleteMovementEndpoint.cs | 2 +- PyroFetes/Endpoints/Movement/GetAllMovementsEndpoint.cs | 2 +- PyroFetes/Endpoints/Movement/GetMovementEndpoint.cs | 2 +- PyroFetes/Endpoints/Movement/UpdateMovementEndpoint.cs | 2 +- PyroFetes/Endpoints/Product/CreateProductEndpoint.cs | 2 +- PyroFetes/Endpoints/Product/DeleteProductEndpoint.cs | 2 +- PyroFetes/Endpoints/Product/GetAllProductsEndpoint.cs | 2 +- PyroFetes/Endpoints/Product/GetProductEndpoint.cs | 2 +- PyroFetes/Endpoints/Product/UpdateProductEndpoint.cs | 2 +- .../Endpoints/ProductCategory/CreateProductCategoryEndpoint.cs | 2 +- .../Endpoints/ProductCategory/DeleteProductCategoryEndpoint.cs | 2 +- .../ProductCategory/GetAllProductCategoriesEndpoint.cs | 2 +- .../Endpoints/ProductCategory/GetProductCategoryEndpoint.cs | 2 +- .../Endpoints/ProductCategory/UpdateProductCategoryEndpoint.cs | 2 +- PyroFetes/Endpoints/Supplier/CreateSupplierEndpoint.cs | 2 +- PyroFetes/Endpoints/Supplier/DeleteSupplierEndpoint.cs | 2 +- PyroFetes/Endpoints/Supplier/GetAllSupplierEndpoint.cs | 2 +- PyroFetes/Endpoints/Supplier/GetSupplierEndpoint.cs | 2 +- PyroFetes/Endpoints/Supplier/UpdateSupplierEndpoint.cs | 2 +- PyroFetes/Endpoints/Warehouse/CreateWarehouseEndpoint.cs | 2 +- PyroFetes/Endpoints/Warehouse/DeleteWarehouseEndpoint.cs | 2 +- PyroFetes/Endpoints/Warehouse/GetAllWarehouseEndpoint.cs | 2 +- PyroFetes/Endpoints/Warehouse/GetWarehouseEndpoint.cs | 2 +- PyroFetes/Endpoints/Warehouse/UpdateWarehouseEndpoint.cs | 2 +- 49 files changed, 49 insertions(+), 49 deletions(-) diff --git a/PyroFetes/Endpoints/Brand/CreateBrandEndpoint.cs b/PyroFetes/Endpoints/Brand/CreateBrandEndpoint.cs index 4ff5724..a3147be 100644 --- a/PyroFetes/Endpoints/Brand/CreateBrandEndpoint.cs +++ b/PyroFetes/Endpoints/Brand/CreateBrandEndpoint.cs @@ -8,7 +8,7 @@ public class CreateBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi { public override void Configure() { - Post("/api/brands"); + Post("/brands"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Brand/DeleteBrandEndpoint.cs b/PyroFetes/Endpoints/Brand/DeleteBrandEndpoint.cs index eb4fa26..c32821d 100644 --- a/PyroFetes/Endpoints/Brand/DeleteBrandEndpoint.cs +++ b/PyroFetes/Endpoints/Brand/DeleteBrandEndpoint.cs @@ -12,7 +12,7 @@ public class DeleteBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi { public override void Configure() { - Delete("/api/brands/{@id}", x => new { x.Id }); + Delete("/brands/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Brand/GetAllBrandsEndpoint.cs b/PyroFetes/Endpoints/Brand/GetAllBrandsEndpoint.cs index 2f7be29..210e13c 100644 --- a/PyroFetes/Endpoints/Brand/GetAllBrandsEndpoint.cs +++ b/PyroFetes/Endpoints/Brand/GetAllBrandsEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllBrandsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpo { public override void Configure() { - Get("/api/brands"); + Get("/brands"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Brand/GetBrandEndpoint.cs b/PyroFetes/Endpoints/Brand/GetBrandEndpoint.cs index 0e8dc22..56e5256 100644 --- a/PyroFetes/Endpoints/Brand/GetBrandEndpoint.cs +++ b/PyroFetes/Endpoints/Brand/GetBrandEndpoint.cs @@ -13,7 +13,7 @@ public class GetBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) :Endpoint new { x.Id }); + Get("/brands/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Brand/UpdateBrandEndpoint.cs b/PyroFetes/Endpoints/Brand/UpdateBrandEndpoint.cs index 6d4ce06..f5aa408 100644 --- a/PyroFetes/Endpoints/Brand/UpdateBrandEndpoint.cs +++ b/PyroFetes/Endpoints/Brand/UpdateBrandEndpoint.cs @@ -8,7 +8,7 @@ public class UpdateBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi { public override void Configure() { - Put("/api/brands/{Id}"); + Put("/brands/{Id}"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Classification/CreateClassificationEndpoint.cs b/PyroFetes/Endpoints/Classification/CreateClassificationEndpoint.cs index 34184dc..8690b95 100644 --- a/PyroFetes/Endpoints/Classification/CreateClassificationEndpoint.cs +++ b/PyroFetes/Endpoints/Classification/CreateClassificationEndpoint.cs @@ -8,7 +8,7 @@ public class CreateClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext) { public override void Configure() { - Post("/api/classifications"); + Post("/classifications"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Classification/DeleteClassificationEndpoint.cs b/PyroFetes/Endpoints/Classification/DeleteClassificationEndpoint.cs index 0982278..969677f 100644 --- a/PyroFetes/Endpoints/Classification/DeleteClassificationEndpoint.cs +++ b/PyroFetes/Endpoints/Classification/DeleteClassificationEndpoint.cs @@ -12,7 +12,7 @@ public class DeleteClassificationEndpoint(PyroFetesDbContext libraryDbContext) : { public override void Configure() { - Delete("/api/classifications/{@id}", x => new { x.Id }); + Delete("/classifications/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Classification/GetAllClassificationsEndpoint.cs b/PyroFetes/Endpoints/Classification/GetAllClassificationsEndpoint.cs index b96ab3a..5c5686d 100644 --- a/PyroFetes/Endpoints/Classification/GetAllClassificationsEndpoint.cs +++ b/PyroFetes/Endpoints/Classification/GetAllClassificationsEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllClassificationsEndpoint(PyroFetesDbContext pyrofetesdbcontext { public override void Configure() { - Get("/api/classifications"); + Get("/classifications"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Classification/GetClassificationEndpoint.cs b/PyroFetes/Endpoints/Classification/GetClassificationEndpoint.cs index fd7dafd..e709089 100644 --- a/PyroFetes/Endpoints/Classification/GetClassificationEndpoint.cs +++ b/PyroFetes/Endpoints/Classification/GetClassificationEndpoint.cs @@ -13,7 +13,7 @@ public class GetClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext) :E { public override void Configure() { - Get("/api/classifications/{@id}", x => new { x.Id }); + Get("/classifications/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Classification/UpdateClassificationEndpoint.cs b/PyroFetes/Endpoints/Classification/UpdateClassificationEndpoint.cs index 8569cc7..1dd9bc7 100644 --- a/PyroFetes/Endpoints/Classification/UpdateClassificationEndpoint.cs +++ b/PyroFetes/Endpoints/Classification/UpdateClassificationEndpoint.cs @@ -8,7 +8,7 @@ public class UpdateClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext) { public override void Configure() { - Put("/api/classifications"); + Put("/classifications"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Color/CreateColorEndpoint.cs b/PyroFetes/Endpoints/Color/CreateColorEndpoint.cs index 7d9ee6e..206f905 100644 --- a/PyroFetes/Endpoints/Color/CreateColorEndpoint.cs +++ b/PyroFetes/Endpoints/Color/CreateColorEndpoint.cs @@ -9,7 +9,7 @@ public class CreateColorEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoi { public override void Configure() //Configuration de l'endpoint { - Post("Api/colors"); //Création d'un endpoint pour créer une couleur avec les données de CreateColorDto + Post("/colors"); //Création d'un endpoint pour créer une couleur avec les données de CreateColorDto AllowAnonymous(); //Laisser passer les requêtes non authentifiées } diff --git a/PyroFetes/Endpoints/Color/DeleteColorEndpoint.cs b/PyroFetes/Endpoints/Color/DeleteColorEndpoint.cs index 2b4713d..51c2505 100644 --- a/PyroFetes/Endpoints/Color/DeleteColorEndpoint.cs +++ b/PyroFetes/Endpoints/Color/DeleteColorEndpoint.cs @@ -12,7 +12,7 @@ public class DeleteColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi { public override void Configure() { - Delete("Api/colors/{@id}", x => new { x.Id }); + Delete("/colors/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Color/GetAllColorsEndpoint.cs b/PyroFetes/Endpoints/Color/GetAllColorsEndpoint.cs index fcfd0e2..a2f9b39 100644 --- a/PyroFetes/Endpoints/Color/GetAllColorsEndpoint.cs +++ b/PyroFetes/Endpoints/Color/GetAllColorsEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllColorsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpo { public override void Configure() { - Get("Api/colors"); + Get("/colors"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Color/GetColorEndpoint.cs b/PyroFetes/Endpoints/Color/GetColorEndpoint.cs index bec8c0d..dcacb8a 100644 --- a/PyroFetes/Endpoints/Color/GetColorEndpoint.cs +++ b/PyroFetes/Endpoints/Color/GetColorEndpoint.cs @@ -13,7 +13,7 @@ public class GetColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint< { public override void Configure() { - Get("Api/colors/{@id}", x => new { x.Id}); + Get("/colors/{@id}", x => new { x.Id}); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs b/PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs index 1cbb3c9..b05c896 100644 --- a/PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs +++ b/PyroFetes/Endpoints/Color/UpdateColorEndpoint.cs @@ -9,7 +9,7 @@ public class UpdateColorEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi { public override void Configure() { - Put("Api/colors/{@id}", x => new { x.Id }); + Put("/colors/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Effect/CreateEffectEndpoint.cs b/PyroFetes/Endpoints/Effect/CreateEffectEndpoint.cs index 9596977..c974f7f 100644 --- a/PyroFetes/Endpoints/Effect/CreateEffectEndpoint.cs +++ b/PyroFetes/Endpoints/Effect/CreateEffectEndpoint.cs @@ -8,7 +8,7 @@ public class CreateEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpo { public override void Configure() { - Post("Api/effects"); + Post("/effects"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Effect/DeleteEffectEndpoint.cs b/PyroFetes/Endpoints/Effect/DeleteEffectEndpoint.cs index f9d4ef6..98549dc 100644 --- a/PyroFetes/Endpoints/Effect/DeleteEffectEndpoint.cs +++ b/PyroFetes/Endpoints/Effect/DeleteEffectEndpoint.cs @@ -11,7 +11,7 @@ public class DeleteEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpo { public override void Configure() { - Delete("Api/effects/{@id}", x => new { x.Id }); + Delete("/effects/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Effect/GetAllEffectsEndpoint.cs b/PyroFetes/Endpoints/Effect/GetAllEffectsEndpoint.cs index 753131a..fd1c903 100644 --- a/PyroFetes/Endpoints/Effect/GetAllEffectsEndpoint.cs +++ b/PyroFetes/Endpoints/Effect/GetAllEffectsEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllEffectsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endp { public override void Configure() { - Get("Api/effects"); + Get("/effects"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs b/PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs index 9096551..115dbbb 100644 --- a/PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs +++ b/PyroFetes/Endpoints/Effect/GetEffectEndpoint.cs @@ -13,7 +13,7 @@ public class GetEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint { public override void Configure() { - Get("Api/effects/{@id}", x => new { x.Id }); + Get("/effects/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs b/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs index 468691f..085d589 100644 --- a/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs +++ b/PyroFetes/Endpoints/Effect/UpdateEffectEndpoint.cs @@ -9,7 +9,7 @@ public class UpdateEffectEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpo { public override void Configure() { - Put("Api/effects/{@id}", x => new { x.Id }); + Put("/effects/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Material/CreateMaterialEndpoint.cs b/PyroFetes/Endpoints/Material/CreateMaterialEndpoint.cs index 7d175af..ac13f33 100644 --- a/PyroFetes/Endpoints/Material/CreateMaterialEndpoint.cs +++ b/PyroFetes/Endpoints/Material/CreateMaterialEndpoint.cs @@ -8,7 +8,7 @@ public class CreateMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { public override void Configure() { - Post("Api/materials"); + Post("/materials"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Material/GetAllMaterialsEndpoint.cs b/PyroFetes/Endpoints/Material/GetAllMaterialsEndpoint.cs index 292959a..e4268e9 100644 --- a/PyroFetes/Endpoints/Material/GetAllMaterialsEndpoint.cs +++ b/PyroFetes/Endpoints/Material/GetAllMaterialsEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllMaterialsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : En { public override void Configure() { - Get("Api/materials"); + Get("/materials"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs b/PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs index 2745451..57b5b62 100644 --- a/PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs +++ b/PyroFetes/Endpoints/Material/GetMaterialEndpoint.cs @@ -13,7 +13,7 @@ public class GetMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi { public override void Configure() { - Get("Api/materials/{@id}", x => new { x.Id }); + Get("/materials/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Material/UpdateMaterialEndpoint.cs b/PyroFetes/Endpoints/Material/UpdateMaterialEndpoint.cs index 7260213..8468374 100644 --- a/PyroFetes/Endpoints/Material/UpdateMaterialEndpoint.cs +++ b/PyroFetes/Endpoints/Material/UpdateMaterialEndpoint.cs @@ -9,7 +9,7 @@ public class UpdateMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { public override void Configure() { - Put("Api/materials/{@id}", x => new { x.Id }); + Put("/materials/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Movement/CreateMovementEndpoint.cs b/PyroFetes/Endpoints/Movement/CreateMovementEndpoint.cs index d8e838f..069462d 100644 --- a/PyroFetes/Endpoints/Movement/CreateMovementEndpoint.cs +++ b/PyroFetes/Endpoints/Movement/CreateMovementEndpoint.cs @@ -8,7 +8,7 @@ public class CreateMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { public override void Configure() { - Post("/api/movements"); + Post("/movements"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Movement/DeleteMovementEndpoint.cs b/PyroFetes/Endpoints/Movement/DeleteMovementEndpoint.cs index c49bd04..d112cd5 100644 --- a/PyroFetes/Endpoints/Movement/DeleteMovementEndpoint.cs +++ b/PyroFetes/Endpoints/Movement/DeleteMovementEndpoint.cs @@ -12,7 +12,7 @@ public class DeleteMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { public override void Configure() { - Delete("/api/Movements/{@id}", x => new { x.Id }); + Delete("/Movements/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Movement/GetAllMovementsEndpoint.cs b/PyroFetes/Endpoints/Movement/GetAllMovementsEndpoint.cs index da0d977..68655a8 100644 --- a/PyroFetes/Endpoints/Movement/GetAllMovementsEndpoint.cs +++ b/PyroFetes/Endpoints/Movement/GetAllMovementsEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllMovementsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : En { public override void Configure() { - Get("/api/movements"); + Get("/movements"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Movement/GetMovementEndpoint.cs b/PyroFetes/Endpoints/Movement/GetMovementEndpoint.cs index 33e60ec..f496265 100644 --- a/PyroFetes/Endpoints/Movement/GetMovementEndpoint.cs +++ b/PyroFetes/Endpoints/Movement/GetMovementEndpoint.cs @@ -13,7 +13,7 @@ public class GetMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) :Endpoin { public override void Configure() { - Get("/api/movements/{@id}", x => new { x.Id }); + Get("/movements/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Movement/UpdateMovementEndpoint.cs b/PyroFetes/Endpoints/Movement/UpdateMovementEndpoint.cs index 9e69545..dd6d859 100644 --- a/PyroFetes/Endpoints/Movement/UpdateMovementEndpoint.cs +++ b/PyroFetes/Endpoints/Movement/UpdateMovementEndpoint.cs @@ -8,7 +8,7 @@ public class UpdateMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { public override void Configure() { - Put("/api/movements"); + Put("/movements"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs b/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs index d6bc518..45d0809 100644 --- a/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs +++ b/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs @@ -11,7 +11,7 @@ public class CreateProductEndpoint(PyroFetesDbContext db) { public override void Configure() { - Post("/api/products"); + Post("/products"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Product/DeleteProductEndpoint.cs b/PyroFetes/Endpoints/Product/DeleteProductEndpoint.cs index f400abe..57bed29 100644 --- a/PyroFetes/Endpoints/Product/DeleteProductEndpoint.cs +++ b/PyroFetes/Endpoints/Product/DeleteProductEndpoint.cs @@ -13,7 +13,7 @@ public class DeleteProductEndpoint(PyroFetesDbContext db) : Endpoint new { x.Id }); + Delete("/products/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Product/GetAllProductsEndpoint.cs b/PyroFetes/Endpoints/Product/GetAllProductsEndpoint.cs index 069f16e..d7d4182 100644 --- a/PyroFetes/Endpoints/Product/GetAllProductsEndpoint.cs +++ b/PyroFetes/Endpoints/Product/GetAllProductsEndpoint.cs @@ -11,7 +11,7 @@ public class GetAllProductsEndpoint(PyroFetesDbContext db) { public override void Configure() { - Get("/api/products"); + Get("/products"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Product/GetProductEndpoint.cs b/PyroFetes/Endpoints/Product/GetProductEndpoint.cs index 8c04747..6160e4d 100644 --- a/PyroFetes/Endpoints/Product/GetProductEndpoint.cs +++ b/PyroFetes/Endpoints/Product/GetProductEndpoint.cs @@ -16,7 +16,7 @@ public class GetProductEndpoint(PyroFetesDbContext db) { 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/Product/UpdateProductEndpoint.cs b/PyroFetes/Endpoints/Product/UpdateProductEndpoint.cs index 0577f83..71dc6bf 100644 --- a/PyroFetes/Endpoints/Product/UpdateProductEndpoint.cs +++ b/PyroFetes/Endpoints/Product/UpdateProductEndpoint.cs @@ -13,7 +13,7 @@ public class UpdateProductEndpoint(PyroFetesDbContext db) public override void Configure() { // Route HTTP PUT avec un paramètre d'identifiant dans l'URL - Put("/api/products/{@id}", x => new { x.Id }); + Put("/products/{@id}", x => new { x.Id }); // Autorise les requêtes anonymes (sans authentification) AllowAnonymous(); diff --git a/PyroFetes/Endpoints/ProductCategory/CreateProductCategoryEndpoint.cs b/PyroFetes/Endpoints/ProductCategory/CreateProductCategoryEndpoint.cs index b1009f9..e991ac3 100644 --- a/PyroFetes/Endpoints/ProductCategory/CreateProductCategoryEndpoint.cs +++ b/PyroFetes/Endpoints/ProductCategory/CreateProductCategoryEndpoint.cs @@ -8,7 +8,7 @@ public class CreateProductCategoryEndpoint(PyroFetesDbContext pyrofetesdbcontext { public override void Configure() { - Post("/api/productcategories"); + Post("/productcategories"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/ProductCategory/DeleteProductCategoryEndpoint.cs b/PyroFetes/Endpoints/ProductCategory/DeleteProductCategoryEndpoint.cs index 9b00562..ef563b6 100644 --- a/PyroFetes/Endpoints/ProductCategory/DeleteProductCategoryEndpoint.cs +++ b/PyroFetes/Endpoints/ProductCategory/DeleteProductCategoryEndpoint.cs @@ -12,7 +12,7 @@ public class DeleteProductCategoryEndpoint(PyroFetesDbContext pyrofetesdbcontext { public override void Configure() { - Delete("/api/productcategories/{@id}", x => new { x.Id }); + Delete("/productcategories/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/ProductCategory/GetAllProductCategoriesEndpoint.cs b/PyroFetes/Endpoints/ProductCategory/GetAllProductCategoriesEndpoint.cs index d0039c6..3a9a0f2 100644 --- a/PyroFetes/Endpoints/ProductCategory/GetAllProductCategoriesEndpoint.cs +++ b/PyroFetes/Endpoints/ProductCategory/GetAllProductCategoriesEndpoint.cs @@ -8,7 +8,7 @@ public class GetAllProductCategoriesEndpoint(PyroFetesDbContext pyrofetesdbconte { public override void Configure() { - Get("/api/productcategories"); + Get("/productcategories"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/ProductCategory/GetProductCategoryEndpoint.cs b/PyroFetes/Endpoints/ProductCategory/GetProductCategoryEndpoint.cs index f2d823b..d9a39ee 100644 --- a/PyroFetes/Endpoints/ProductCategory/GetProductCategoryEndpoint.cs +++ b/PyroFetes/Endpoints/ProductCategory/GetProductCategoryEndpoint.cs @@ -14,7 +14,7 @@ public class GetProductCategoryEndpoint(PyroFetesDbContext pyrofetesdbcontext) : { public override void Configure() { - Get("/api/productcategory/{@id}", x => new { x.Id }); + Get("/productcategory/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/ProductCategory/UpdateProductCategoryEndpoint.cs b/PyroFetes/Endpoints/ProductCategory/UpdateProductCategoryEndpoint.cs index e5d7e21..e5987f6 100644 --- a/PyroFetes/Endpoints/ProductCategory/UpdateProductCategoryEndpoint.cs +++ b/PyroFetes/Endpoints/ProductCategory/UpdateProductCategoryEndpoint.cs @@ -9,7 +9,7 @@ public class UpdateProductCategoryEndpoint(PyroFetesDbContext pyrofetesdbcontext { public override void Configure() { - Put("/api/productcategory/{@id}", x => new { x.Id }); + Put("/productcategory/{@id}", x => new { x.Id }); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Supplier/CreateSupplierEndpoint.cs b/PyroFetes/Endpoints/Supplier/CreateSupplierEndpoint.cs index 530e1af..f0be16c 100644 --- a/PyroFetes/Endpoints/Supplier/CreateSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Supplier/CreateSupplierEndpoint.cs @@ -11,7 +11,7 @@ public class CreateSupplierEndpoint(PyroFetesDbContext pyrofetesdbcontext) { public override void Configure() { - Post("/api/suppliers"); + Post("/suppliers"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Supplier/DeleteSupplierEndpoint.cs b/PyroFetes/Endpoints/Supplier/DeleteSupplierEndpoint.cs index e9735dc..f63d3d2 100644 --- a/PyroFetes/Endpoints/Supplier/DeleteSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Supplier/DeleteSupplierEndpoint.cs @@ -13,7 +13,7 @@ public class DeleteSupplierEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { 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/Supplier/GetAllSupplierEndpoint.cs b/PyroFetes/Endpoints/Supplier/GetAllSupplierEndpoint.cs index 28517a3..8f019ff 100644 --- a/PyroFetes/Endpoints/Supplier/GetAllSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Supplier/GetAllSupplierEndpoint.cs @@ -11,7 +11,7 @@ public class GetAllSuppliersEndpoint(PyroFetesDbContext pyrofetesdbcontext) { public override void Configure() { - Get("/api/suppliers"); + Get("/suppliers"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Supplier/GetSupplierEndpoint.cs b/PyroFetes/Endpoints/Supplier/GetSupplierEndpoint.cs index a66bfad..74fd30f 100644 --- a/PyroFetes/Endpoints/Supplier/GetSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Supplier/GetSupplierEndpoint.cs @@ -15,7 +15,7 @@ public class GetSupplierEndpoint(PyroFetesDbContext pyrofetesdbcontext) { 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/Supplier/UpdateSupplierEndpoint.cs b/PyroFetes/Endpoints/Supplier/UpdateSupplierEndpoint.cs index fde3c2e..a3938fe 100644 --- a/PyroFetes/Endpoints/Supplier/UpdateSupplierEndpoint.cs +++ b/PyroFetes/Endpoints/Supplier/UpdateSupplierEndpoint.cs @@ -10,7 +10,7 @@ public class UpdateSupplierEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { 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/Warehouse/CreateWarehouseEndpoint.cs b/PyroFetes/Endpoints/Warehouse/CreateWarehouseEndpoint.cs index e6ff638..ac8a12d 100644 --- a/PyroFetes/Endpoints/Warehouse/CreateWarehouseEndpoint.cs +++ b/PyroFetes/Endpoints/Warehouse/CreateWarehouseEndpoint.cs @@ -10,7 +10,7 @@ public class CreateWarehouseEndpoint(PyroFetesDbContext db) { public override void Configure() { - Post("/api/warehouse"); + Post("/warehouse"); AllowAnonymous(); } diff --git a/PyroFetes/Endpoints/Warehouse/DeleteWarehouseEndpoint.cs b/PyroFetes/Endpoints/Warehouse/DeleteWarehouseEndpoint.cs index 4ea299d..994fc64 100644 --- a/PyroFetes/Endpoints/Warehouse/DeleteWarehouseEndpoint.cs +++ b/PyroFetes/Endpoints/Warehouse/DeleteWarehouseEndpoint.cs @@ -13,7 +13,7 @@ public class DeleteWarehouseEndpoint(PyroFetesDbContext db) : Endpoint