forked from sanchezvem/PyroFetes
added AllowAnonymous();
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user