Geburtsdatum fix

This commit is contained in:
Klaas Börgmann 2024-06-11 22:40:04 +02:00
parent 9a75483fa7
commit 66e0569912
2 changed files with 2 additions and 3 deletions

5
app.js
View File

@ -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);

BIN
public/.DS_Store vendored

Binary file not shown.