From b12e30b3afd5a7742781a98e9b7896cc26dd22fe Mon Sep 17 00:00:00 2001 From: Alyssia Tan Date: Tue, 12 Mar 2024 17:41:21 -0700 Subject: [PATCH 1/2] /season route now returns event id --- routes/publishedSchedule.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/publishedSchedule.js b/routes/publishedSchedule.js index a515f27..5f5bd6d 100644 --- a/routes/publishedSchedule.js +++ b/routes/publishedSchedule.js @@ -160,6 +160,7 @@ publishedScheduleRouter.get('/season', async (req, res) => { ( SELECT PS.id, + PS.event_id, PS.day_id, D.id AS day_day_id, D.event_date, @@ -197,6 +198,7 @@ publishedScheduleRouter.get('/season', async (req, res) => { JSON_AGG( json_build_object ( 'id', seasonPS.id, + 'event_id', seasonPS.event_id, 'title', seasonPS.title, 'event_type', seasonPS.event_type, 'year', seasonPS.year, From b638051381de8669c00bc406bb85385b027ad775 Mon Sep 17 00:00:00 2001 From: ThatMegamind Date: Thu, 21 Mar 2024 15:00:52 -0700 Subject: [PATCH 2/2] missing comma --- routes/publishedSchedule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/publishedSchedule.js b/routes/publishedSchedule.js index 5f5bd6d..2e85ecb 100644 --- a/routes/publishedSchedule.js +++ b/routes/publishedSchedule.js @@ -396,7 +396,7 @@ publishedScheduleRouter.put('/:id', async (req, res) => { start_time = COALESCE($5, start_time), end_time = COALESCE($6, end_time), cohort = COALESCE($7, cohort), - notes = COALESCE($8, notes) + notes = COALESCE($8, notes), created_on = COALESCE($9, created_on) WHERE id = $10