Skip to content

Build your personal knowledge base with Trilium Notes

refactor(routes/login): use "shorter" syntax for passing to ejs render

Panagiotis Papadopoulos1a0c35f43d96
diff --git a/src/routes/login.ts b/src/routes/login.ts
index e3c1a61fb5..a739faa2e7 100644
--- a/src/routes/login.ts
+++ b/src/routes/login.ts
@@ -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,8 +46,8 @@ function setPassword(req: Request, res: Response) {
if (error) {
res.render("set_password", {
error,
- assetPath: assetPath,
- appPath: appPath
+ assetPath,
+ appPath
});
return;
}
@@ -66,8 +66,8 @@ function login(req: Request, res: Response) {
return res.status(401).render("login", {
failedAuth: true,
- assetPath: assetPath,
- appPath: appPath
+ assetPath,
+ appPath
});
}