feat(api): add protected connect account endpoint
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace FiscalOS.API.Accounts;
|
||||
|
||||
internal static class AccountsExtensions
|
||||
{
|
||||
private const string RouteGroupPrefix = "/accounts";
|
||||
|
||||
public static RouteGroupBuilder MapAccountsEndpoints(this WebApplication app)
|
||||
{
|
||||
var accountsGroup = app.MapGroup(RouteGroupPrefix).RequireAuthorization();
|
||||
|
||||
accountsGroup.MapConnectEndpoint();
|
||||
|
||||
return accountsGroup;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace FiscalOS.API.Accounts.Connect;
|
||||
|
||||
internal static class Endpoint
|
||||
{
|
||||
private const string Route = "/connect";
|
||||
|
||||
public static RouteHandlerBuilder MapConnectEndpoint(this RouteGroupBuilder groupBuilder)
|
||||
{
|
||||
return groupBuilder.MapPost(Route, HandleAsync);
|
||||
}
|
||||
|
||||
private static async Task<IResult> HandleAsync()
|
||||
{
|
||||
return Results.Ok();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user