mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
refactor(routes/login): use "shorter" syntax for passing to ejs render
This commit is contained in:
parent
0aa1d602a1
commit
1a0c35f43d
@ -13,16 +13,16 @@ import type { Request, Response } from "express";
|
|||||||
function loginPage(req: Request, res: Response) {
|
function loginPage(req: Request, res: Response) {
|
||||||
res.render("login", {
|
res.render("login", {
|
||||||
failedAuth: false,
|
failedAuth: false,
|
||||||
assetPath: assetPath,
|
assetPath,
|
||||||
appPath: appPath
|
appPath
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPasswordPage(req: Request, res: Response) {
|
function setPasswordPage(req: Request, res: Response) {
|
||||||
res.render("set_password", {
|
res.render("set_password", {
|
||||||
error: false,
|
error: false,
|
||||||
assetPath: assetPath,
|
assetPath,
|
||||||
appPath: appPath
|
appPath
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +46,8 @@ function setPassword(req: Request, res: Response) {
|
|||||||
if (error) {
|
if (error) {
|
||||||
res.render("set_password", {
|
res.render("set_password", {
|
||||||
error,
|
error,
|
||||||
assetPath: assetPath,
|
assetPath,
|
||||||
appPath: appPath
|
appPath
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -66,8 +66,8 @@ function login(req: Request, res: Response) {
|
|||||||
|
|
||||||
return res.status(401).render("login", {
|
return res.status(401).render("login", {
|
||||||
failedAuth: true,
|
failedAuth: true,
|
||||||
assetPath: assetPath,
|
assetPath,
|
||||||
appPath: appPath
|
appPath
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user