weiterleitung fix

This commit is contained in:
Klaas 2024-05-29 20:07:59 +02:00
parent 90c6f77b12
commit 4bc863f9d0
1 changed files with 2 additions and 2 deletions

4
app.js
View File

@ -405,7 +405,7 @@ app.post('/update-training', requireAuth, async (req, res) => {
} else if (type === 'aufwaermen') { } else if (type === 'aufwaermen') {
await pool.query('UPDATE trainings SET aufwaermen = $1 WHERE id = $2', [ spielId, trainingId ]); await pool.query('UPDATE trainings SET aufwaermen = $1 WHERE id = $2', [ spielId, trainingId ]);
} }
res.redirect('/'); res.redirect('/training');
} catch (err) { } catch (err) {
console.error(err); console.error(err);
res.send("Error " + err); res.send("Error " + err);
@ -421,7 +421,7 @@ app.post('/update-leader', requireAuth , async (req, res) => {
} else if (type === 'spielleiter') { } else if (type === 'spielleiter') {
await pool.query('UPDATE trainings SET spielleiter = $1 WHERE id = $2', [leaderId, trainingId]); await pool.query('UPDATE trainings SET spielleiter = $1 WHERE id = $2', [leaderId, trainingId]);
} }
res.redirect('/'); res.redirect('/training');
} catch (err) { } catch (err) {
console.error(err); console.error(err);
res.send("Error " + err); res.send("Error " + err);