Refactor runtime bootstrap and ship control flows
This commit is contained in:
17
apps/backend/Auth/Api/ForgotPasswordHandler.cs
Normal file
17
apps/backend/Auth/Api/ForgotPasswordHandler.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.Auth.Api;
|
||||
|
||||
public sealed class ForgotPasswordHandler(AuthService authService) : Endpoint<ForgotPasswordRequest, ForgotPasswordResponse>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/auth/forgot-password");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(ForgotPasswordRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
await SendOkAsync(await authService.ForgotPasswordAsync(request, cancellationToken), cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user