Anwesenheit bugfix

This commit is contained in:
Klaas 2024-06-06 22:17:19 +02:00
parent 8530cbf21b
commit 9a75483fa7
1 changed files with 2 additions and 2 deletions

2
app.js
View File

@ -829,7 +829,7 @@ app.post('/anwesend', requireAuth, async (req, res) => {
req.session.activeTab = 'anwesend'; req.session.activeTab = 'anwesend';
try { try {
await pool.query('Delete FROM anwesend WHERE fid_training = $1', [trainingId]); // await pool.query('Delete FROM anwesend WHERE fid_training = $1', [trainingId]);
for (const teilnehmer of anw) { for (const teilnehmer of anw) {
await pool.query('INSERT INTO anwesend (fid_teilnehmer, fid_training) VALUES ($1, $2)', [teilnehmer, trainingId]); await pool.query('INSERT INTO anwesend (fid_teilnehmer, fid_training) VALUES ($1, $2)', [teilnehmer, trainingId]);
} }