refactor(wbs-ux): route root authenticated users to Vue templates and map SPA fallback

This commit is contained in:
2026-07-25 11:51:24 +09:00
parent 1a06a01018
commit afa1b98e19
+4 -2
View File
@@ -192,11 +192,11 @@ try
Log.Warning("Hangfire setup failed: {Message}", ex.Message);
}
// Root redirect: unauthenticated → /Account/Login, authenticated → /Admin/Dashboard
// Root redirect: unauthenticated → /Account/Login, authenticated → Vue 3 SPA /templates
app.MapGet("/", context =>
{
if (context.User?.Identity?.IsAuthenticated ?? false)
context.Response.Redirect("/Admin/Dashboard");
context.Response.Redirect("/templates");
else
context.Response.Redirect("/Account/Login");
return Task.CompletedTask;
@@ -210,6 +210,8 @@ try
});
app.MapRazorPages();
app.MapFallbackToFile("index.html");
app.Run();
}