diff --git a/app.js b/app.js index 1cf6f23..c265105 100644 --- a/app.js +++ b/app.js @@ -830,6 +830,8 @@ app.post('/anwesend', requireAuth, async (req, res) => { try { for (const mitgliedId of inriege){ const Idresult = await pool.query('SELECT *From anwesend WHERE fid_teilnehmer = $1 AND fid_training=$2', [mitgliedId, trainingId]) + console.log(anw); + console.log(inriege); if (Idresult.rows.length > 0) { if (!anw.includes(mitgliedId)){ await pool.query('Delete FROM anwesend WHERE fid_teilnehmer = $1 AND fid_training=$2', [mitgliedId, trainingId]) diff --git a/views/trainings.ejs b/views/trainings.ejs index 112f70f..0080a3d 100644 --- a/views/trainings.ejs +++ b/views/trainings.ejs @@ -143,7 +143,7 @@ <%= teilnehmer.vorname %> <%= teilnehmer.nachname %> - value="<%= teilnehmer.id %>"> + value="<%= teilnehmer.id %>"> <% }}) %>