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

5
app.js
View File

@ -275,7 +275,6 @@ app.post('/login', async (req, res) => {
req.session.activeRiege = 1;
req.session.activeTab = 'geraete';
req.session.message = [title = '', message = '', type = 'none'];
log.Info('Success: ' + username + ' - ' + password);
if (user.admin_status === 'expired') {
await pool.query('UPDATE users SET role = $1, admin_temp = NULL WHERE id = $2', ['user', user.id]);
req.session.role = 'user';
@ -288,12 +287,10 @@ app.post('/login', async (req, res) => {
}
} else {
const message = 'Falsches Passwort';
log.Info('wrong Pass' +username + ' - ' + password);
res.render('login', { session: req.session, username, message });
}
} else {
const message = 'Unbekannter Benutzer';
log.Info('wrong User' +username + ' - ' + password)
res.render('login', { session: req.session, username, message });
}
} catch (error) {
@ -885,4 +882,4 @@ app.post('/anwesend', requireAuth, async (req, res) => {
const server = app.listen(port, '0.0.0.0', () => {
log.Info(`Server is running on ${process.env.HOST}:${port}/`);
});
});