Removed Immediate.Apis, Added AOT Testing Scripts.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Htmx.ApiDemo.Data;
|
||||
|
||||
namespace Htmx.ApiDemo;
|
||||
|
||||
public static partial class RouteMap
|
||||
{
|
||||
public static void MapHtmxRoutes(this WebApplication app)
|
||||
{
|
||||
MapGetIndex(app);
|
||||
GetRegister(app);
|
||||
PostRegister(app);
|
||||
PostLogout(app);
|
||||
GetLogin(app);
|
||||
PostLogin(app);
|
||||
GetUiDemo(app);
|
||||
}
|
||||
|
||||
private static void PostLogout(WebApplication app)
|
||||
=> app.MapPost("/logout", async (HttpContext context, AppAuthService authService) =>
|
||||
{
|
||||
await authService.SignOutAsync();
|
||||
return Results.Redirect("/login");
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user