added AllowAnonymous();

This commit is contained in:
2025-11-17 21:20:04 +01:00
parent c6d4ef2c58
commit 27e8fea7f3
23 changed files with 23 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ public class CreatePriceEndpoint(PyroFetesDbContext database) : Endpoint<CreateP
if (existingPrice != null)
{
await Send.ConflictAsync("Le fournisseur a déjà un prix pour ce produit.", ct);
await Send.NotFoundAsync(ct); //"Le fournisseur a déjà un prix pour ce produit.",
return;
}

View File

@@ -10,6 +10,7 @@ public class GetAllProductsEndpoint(PyroFetesDbContext database) : EndpointWitho
public override void Configure()
{
Get("/api/products");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)

View File

@@ -15,6 +15,7 @@ public class GetProductEndpoint(PyroFetesDbContext database) : Endpoint<GetProdu
public override void Configure()
{
Get("/api/products/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetProductRequest req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class UpdateProductEndpoint(PyroFetesDbContext database) : Endpoint<Updat
public override void Configure()
{
Put("/api/products/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(UpdateProductDto req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class GetAllPurchaseOrderEndpoint(PyroFetesDbContext database) : Endpoint
public override void Configure()
{
Get("/api/purchaseOrders");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)

View File

@@ -15,6 +15,7 @@ public class GetPurchaseOrderEndpoint(PyroFetesDbContext database) : Endpoint<Ge
public override void Configure()
{
Get("/api/purchaseOrders/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetPurchaseOrderRequest req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class GetAllQuotationEndpoint(PyroFetesDbContext database) : EndpointWith
public override void Configure()
{
Get("/api/quotations");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)

View File

@@ -15,6 +15,7 @@ public class GetQuotationEndpoint(PyroFetesDbContext database) : Endpoint<GetQuo
public override void Configure()
{
Get("/api/quotations/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetQuotationRequest req, CancellationToken ct)

View File

@@ -9,6 +9,7 @@ public class CreateSettingEndpoint(PyroFetesDbContext database) : Endpoint<Creat
public override void Configure()
{
Post("/api/setting");
AllowAnonymous();
}
public override async Task HandleAsync(CreateSettingDto req, CancellationToken ct)

View File

@@ -13,6 +13,7 @@ public class DeleteSettingEndpoint(PyroFetesDbContext database) : Endpoint<Delet
public override void Configure()
{
Delete("/api/setting/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(DeleteSettingRequest req, CancellationToken ct)

View File

@@ -14,6 +14,7 @@ public class GetSettingEndpoint(PyroFetesDbContext database) : Endpoint<GetSetti
public override void Configure()
{
Get("/api/setting/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetSettingRequest req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class PatchSettingElectronicSignatureEndpoint(PyroFetesDbContext database
public override void Configure()
{
Get("/api/setting/{@Id}/ElectronicSignature", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(PatchSettingElectronicSignatureDto req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class PatchSettingLogoEndpoint(PyroFetesDbContext database) : Endpoint<Pa
public override void Configure()
{
Get("/api/setting/{@Id}/Logo", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(PatchSettingLogoDto req, CancellationToken ct)

View File

@@ -9,6 +9,7 @@ public class CreateSupplierEndpoint(PyroFetesDbContext database) : Endpoint<Crea
public override void Configure()
{
Post("/api/suppliers");
AllowAnonymous();
}
public override async Task HandleAsync(CreateSupplierDto req, CancellationToken ct)

View File

@@ -13,6 +13,7 @@ public class DeleteSupplierEndpoint(PyroFetesDbContext database) : Endpoint<Dele
public override void Configure()
{
Delete("/api/suppliers/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(DeleteSupplierRequest req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class GetAllSuppliersEndpoint(PyroFetesDbContext database) : EndpointWith
public override void Configure()
{
Get("/api/suppliers");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)

View File

@@ -14,6 +14,7 @@ public class GetSupplierEndpoint(PyroFetesDbContext database) : Endpoint<GetSupp
public override void Configure()
{
Get("/api/suppliers/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetSupplierRequest req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class PatchSupplierDeleveryDelayEndpoint(PyroFetesDbContext database) : E
public override void Configure()
{
Get("/api/supplier/{@Id}/DeleveryDalay", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(PatchSupplierDeliveryDelayDto req, CancellationToken ct)

View File

@@ -10,6 +10,7 @@ public class UpdateSupplierEndpoint(PyroFetesDbContext database) : Endpoint<Upda
public override void Configure()
{
Put("/api/suppliers/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(UpdateSupplierDto req, CancellationToken ct)

View File

@@ -13,6 +13,7 @@ public class DeleteUserEndpoint(PyroFetesDbContext database) : Endpoint<DeleteUs
public override void Configure()
{
Delete("/api/users/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(DeleteUserRequest req, CancellationToken ct)

View File

@@ -9,6 +9,7 @@ public class GetAllUsersEndpoint(PyroFetesDbContext database) : EndpointWithoutR
public override void Configure()
{
Get("/api/users");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)

View File

@@ -14,6 +14,7 @@ public class GetUserEndpoint(PyroFetesDbContext database) : Endpoint<GetUserRequ
public override void Configure()
{
Get("/api/users/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetUserRequest req, CancellationToken ct)

View File

@@ -11,6 +11,7 @@ public class UpdateUserEndpoint(PyroFetesDbContext database) : Endpoint<UpdateUs
public override void Configure()
{
Put("/api/users/{@Id}", x => new {x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(UpdateUserDto req, CancellationToken ct)