This commit is contained in:
2025-04-30 09:51:36 +08:00
parent 561881c9aa
commit 09afa239a6
848 changed files with 385870 additions and 205 deletions

View File

@@ -0,0 +1,19 @@
namespace Yes.Blog.Endpoints.Admins.Auths
{
public class UserLogoutEndpoint : AdminEndpointScheme, IEndpoint
{
public void Map(IEndpointRouteBuilder app) => app.MapPost("/Logout", Handle);
private async Task<IResult> Handle(IMediator mediator, IMapper mapper, HttpContext context, CancellationToken cancellationToken)
{
var command = new UserLogoutCommand();
var response = await mediator.Send(command, cancellationToken);
await context.SignOut();
return Result.Ok(response);
}
}
}