log update
This commit is contained in:
parent
370e950550
commit
81fc6037ca
3
app.js
3
app.js
|
@ -275,7 +275,6 @@ app.post('/login', async (req, res) => {
|
||||||
req.session.activeRiege = 1;
|
req.session.activeRiege = 1;
|
||||||
req.session.activeTab = 'geraete';
|
req.session.activeTab = 'geraete';
|
||||||
req.session.message = [title = '', message = '', type = 'none'];
|
req.session.message = [title = '', message = '', type = 'none'];
|
||||||
log.Info('Success: ' + username + ' - ' + password);
|
|
||||||
if (user.admin_status === 'expired') {
|
if (user.admin_status === 'expired') {
|
||||||
await pool.query('UPDATE users SET role = $1, admin_temp = NULL WHERE id = $2', ['user', user.id]);
|
await pool.query('UPDATE users SET role = $1, admin_temp = NULL WHERE id = $2', ['user', user.id]);
|
||||||
req.session.role = 'user';
|
req.session.role = 'user';
|
||||||
|
@ -288,12 +287,10 @@ app.post('/login', async (req, res) => {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const message = 'Falsches Passwort';
|
const message = 'Falsches Passwort';
|
||||||
log.Info('wrong Pass' +username + ' - ' + password);
|
|
||||||
res.render('login', { session: req.session, username, message });
|
res.render('login', { session: req.session, username, message });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const message = 'Unbekannter Benutzer';
|
const message = 'Unbekannter Benutzer';
|
||||||
log.Info('wrong User' +username + ' - ' + password)
|
|
||||||
res.render('login', { session: req.session, username, message });
|
res.render('login', { session: req.session, username, message });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue