From 66e05699125f9d35de68f7d16d3d596bd9bfed45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaas=20B=C3=B6rgmann?= Date: Tue, 11 Jun 2024 22:40:04 +0200 Subject: [PATCH] Geburtsdatum fix --- app.js | 5 ++--- public/.DS_Store | Bin 6148 -> 6148 bytes 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index a66a50b..36bf6be 100644 --- a/app.js +++ b/app.js @@ -534,7 +534,6 @@ app.get('/training', requireAuth, async (req, res) => { selectedKW = moment(selectedDate).isoWeek(); selectetYear = moment(selectedDate).year(); } - console.log(selectedKW + ' ' + selectetYear); const training = await getTraining(selectedDate); const trainingsResult = await pool.query('SELECT datum FROM trainings ORDER BY datum ASC'); @@ -704,7 +703,7 @@ app.post('/set-riege', requireAuth, async (req, res) => { }) app.post('/update-mitglied', requireAdmin, async (req, res) => { - const { type, id, telid, adresse, name, verbindung, nummer } = req.body; + const { type, id, geburt, telid, adresse, name, verbindung, nummer } = req.body; try { if (type == "tel") { console.log('INSERT INTO telefonnummern (fid_teilnehmer, name, verbindung, nummer, stand) VALUES ($1, $2, $3, $4, $5)', [id, name, verbindung, nummer, moment().toDate()]); @@ -713,7 +712,7 @@ app.post('/update-mitglied', requireAdmin, async (req, res) => { await pool.query('DELETE FROM telefonnummern WHERE id = $1', [telid]); console.log('delete numer $1', [telid]); } else if (type == "adresse") { - await pool.query('UPDATE teilnehmende SET adresse = $1 WHERE id = $2', [adresse, id]); + await pool.query('UPDATE teilnehmende SET geburtsdatum = $1, adresse = $2 WHERE id = $3', [geburt, adresse, id]); } res.redirect('/mitglied/' + id); diff --git a/public/.DS_Store b/public/.DS_Store index 3535d1f06d4b4288f2ed23ae8166adc9e6bf4d97..c5508cb71ef86d2c7b1f2d19f36e5dfee4324e24 100644 GIT binary patch delta 67 zcmZoMXfc=|#>B`mu~2NHo+2a5#DLw5ER%Vd7H@vati-bU1G5>^W_AvK4xp0F51GF+ VPv#e~g1?m;rB45ZC|! delta 361 zcmZoMXfc=|#>B)qu~2NHo+2a9#DLw44=^$^@=WGoTwKq_ki}5QP|A?XP{dG~lWrKC zoS$3300NAmZ-69T9D_h}w6U#4S@m}*i8swv2T*;5a)C;>