Put roles into endpoints

This commit is contained in:
Cristiano
2026-05-28 15:36:33 +02:00
parent fc9da89ebe
commit 5869ae18c4
61 changed files with 68 additions and 61 deletions
@@ -11,7 +11,7 @@ public class AddProductFromPurchaseOrderEndpoint(PurchaseProductsRepository purc
public override void Configure()
{
Post("/purchaseOrders/{@PurchaseOrderId}/{@ProductId}", x => new { x.PurchaseOrderId, x.ProductId });
AllowAnonymous();
Roles("Admin","Employe");
}
public override async Task HandleAsync(CreatePurchaseProductDto req, CancellationToken ct)