fix: EJS crash after failed login
This commit is contained in:
Elian Doran 2025-02-26 17:32:53 +02:00 committed by GitHub
commit 43b1b8a306
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,16 +13,16 @@ import type { Request, Response } from "express";
function loginPage(req: Request, res: Response) {
res.render("login", {
failedAuth: false,
assetPath: assetPath,
appPath: appPath
assetPath,
appPath
});
}
function setPasswordPage(req: Request, res: Response) {
res.render("set_password", {
error: false,
assetPath: assetPath,
appPath: appPath
assetPath,
appPath
});
}
@ -46,7 +46,8 @@ function setPassword(req: Request, res: Response) {
if (error) {
res.render("set_password", {
error,
assetPath: assetPath
assetPath,
appPath
});
return;
}
@ -65,7 +66,8 @@ function login(req: Request, res: Response) {
return res.status(401).render("login", {
failedAuth: true,
assetPath: assetPath
assetPath,
appPath
});
}