Put roles into endpoints
This commit is contained in:
@@ -16,7 +16,7 @@ public class DeleteProductToSupplierEndpoint(PricesRepository pricesRepository)
|
||||
public override void Configure()
|
||||
{
|
||||
Delete("/suppliers/{@SupplierId}/{@Product}", x => new { x.SupplierId, x.ProductId });
|
||||
AllowAnonymous();
|
||||
Roles("Admin");
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(DeletePriceRequest req, CancellationToken ct)
|
||||
|
||||
Reference in New Issue
Block a user