feat: Añadir ruta de inicio de sesión para evitar 404 al acceder a /login

This commit is contained in:
Shni
2025-10-14 22:45:18 -05:00
parent f7c68edacc
commit 0cc6725268

View File

@@ -657,6 +657,14 @@ export const server = createServer(
return; return;
} }
// Explicit login route to render login page (avoid 404 when user visits /login)
if (url.pathname === "/login") {
await renderTemplate(req, res, "login", {
appName: pkg.name ?? "Amayo Bot",
});
return;
}
// --- Auth routes (Discord OAuth minimal flow) --- // --- Auth routes (Discord OAuth minimal flow) ---
if (url.pathname === "/auth/discord") { if (url.pathname === "/auth/discord") {
// Redirect to Discord OAuth2 authorize // Redirect to Discord OAuth2 authorize