mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 15:05:26 +02:00
Added message "password not set" to client
This commit is contained in:
parent
ae18f115f0
commit
202a1ef2dc
2 changed files with 6 additions and 2 deletions
|
@ -29,7 +29,11 @@ router.post('/auth', parseForm, csrfProtection, async (req, res) => {
|
||||||
let userDoc = await Users.get();
|
let userDoc = await Users.get();
|
||||||
|
|
||||||
if (!userDoc) {
|
if (!userDoc) {
|
||||||
throw new Error('Password not set');
|
res.render('auth', {
|
||||||
|
title: 'Login page',
|
||||||
|
header: 'Password not set',
|
||||||
|
csrfToken: req.csrfToken()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const passHash = userDoc.passHash;
|
const passHash = userDoc.passHash;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue