From a77279273a83ddc312f5fb1be6f22e852c1fd5f0 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Tue, 29 Oct 2024 15:47:58 +0300 Subject: [PATCH] for date based events use the date part only in the /calendar/:name endpoint --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 82a89d2..9f5857e 100644 --- a/server.js +++ b/server.js @@ -172,8 +172,8 @@ app.get('/calendar/:name', async (req, res) => { } else { // Date-based event calendar.createEvent({ - start: start, - end: end, + start: start.toISOString().split('T')[0], // Use only the date part + end: end.toISOString().split('T')[0], // Use only the date part summary: summary, allDay: true, // Mark as an all-day event });