log update
This commit is contained in:
parent
370e950550
commit
81fc6037ca
5
app.js
5
app.js
|
@ -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}/`);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue