diff --git a/app.js b/app.js index 457cb17..3000392 100644 --- a/app.js +++ b/app.js @@ -105,7 +105,7 @@ const isBirthday = (birthdate, date, previousTraining) => { return 2; } if ( - adjustedBirthdate.getTime() >= previousTraining.getTime() && + adjustedBirthdate.getTime() > previousTraining.getTime() && adjustedBirthdate.getTime() <= date.getTime() ) { return 1; @@ -791,7 +791,6 @@ ORDER BY r.riegennummer, t.geburtsdatum ASC; }); }); if (training) { - console.log("THIS!"); training.datum = getdayOfWeek(training.kw, training.jahr); } @@ -926,7 +925,6 @@ app.get("/mitglied/:id", requireAuth, requireAdmin, async (req, res) => { "SELECT t.id, TO_CHAR(t.datum, 'DD.MM.YYYY') as date, t.* FROM trainings t JOIN anwesend a ON t.id = a.fid_training WHERE a.fid_teilnehmer = $1;", [id] ); - console.log(anwesendResult); const anwesenheiten = anwesendResult.rows; const anwesend = anwesendResult.rows.length; const numberResult = await pool.query(