log update

This commit is contained in:
klaas 2024-09-09 16:59:14 +02:00
parent 370e950550
commit 81fc6037ca
1 changed files with 1 additions and 4 deletions

3
app.js
View File

@ -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) {