1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 06:55:26 +02:00

Added message "password not set" to client

This commit is contained in:
timakasucces 2019-03-06 23:48:37 +03:00
parent ae18f115f0
commit 202a1ef2dc
2 changed files with 6 additions and 2 deletions

View file

@ -17,7 +17,7 @@ app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'twig');
require('./utils/twig');
app.use(logger('dev '));
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cookieParser());

View file

@ -29,7 +29,11 @@ router.post('/auth', parseForm, csrfProtection, async (req, res) => {
let userDoc = await Users.get();
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;