mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-30 00:51:30 +08:00
fix(server): login rendering failure
This commit is contained in:
parent
758745f19e
commit
9688013c91
@ -13,6 +13,7 @@ import openID from '../services/open_id.js';
|
|||||||
import openIDEncryption from '../services/encryption/open_id_encryption.js';
|
import openIDEncryption from '../services/encryption/open_id_encryption.js';
|
||||||
|
|
||||||
function loginPage(req: Request, res: Response) {
|
function loginPage(req: Request, res: Response) {
|
||||||
|
// Login page is triggered twice. Once here, and another time if the password is failed.
|
||||||
res.render('login', {
|
res.render('login', {
|
||||||
wrongPassword: false,
|
wrongPassword: false,
|
||||||
wrongTotp: false,
|
wrongTotp: false,
|
||||||
@ -170,6 +171,7 @@ function sendLoginError(req: Request, res: Response, errorType: 'password' | 'to
|
|||||||
totpEnabled: totp.isTotpEnabled(),
|
totpEnabled: totp.isTotpEnabled(),
|
||||||
ssoEnabled: openID.isOpenIDEnabled(),
|
ssoEnabled: openID.isOpenIDEnabled(),
|
||||||
assetPath: assetPath,
|
assetPath: assetPath,
|
||||||
|
assetPathFragment: assetUrlFragment,
|
||||||
appPath: appPath,
|
appPath: appPath,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user