1
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public class CreateCommentEndpoint : BlogEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/comments", Handle).WithRequestValidation<Request>();
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/comments", Handle).WithRequestValidation<Request>().AllowAnonymous();
|
||||
|
||||
|
||||
public record Request(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public class IndexEndpoint : BlogEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/{**path}", Handle);
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/{**path}", Handle).AllowAnonymous();
|
||||
|
||||
private async Task<Microsoft.AspNetCore.Http.IResult> Handle(
|
||||
IMediator mediator,
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace Yes.Blog.Endpoints.Blogs
|
||||
{
|
||||
public class InstallEndpoint : BlogEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("install", Handle).WithRequestValidation<Request>();
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("install", Handle).WithRequestValidation<Request>().AllowAnonymous();
|
||||
|
||||
public record Request(
|
||||
string DatabaseType,
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace Yes.Blog.Endpoints.Blogs
|
||||
{
|
||||
public class SearchEndpoint : BlogEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/search", Handle).DisableAntiforgery();
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/search", Handle).DisableAntiforgery().AllowAnonymous();
|
||||
|
||||
|
||||
public record Request(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
public class VersionEndpoint : BlogEndpointScheme, IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/version", Handle);
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapGet("/version", Handle).AllowAnonymous();
|
||||
|
||||
private string Handle(
|
||||
CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user