1
0
Fork 0

for date based events use the date part only in the /calendar/:name endpoint

This commit is contained in:
Ryan Mwangi 2024-10-29 15:47:58 +03:00
parent c6300bd68f
commit a77279273a
1 changed files with 2 additions and 2 deletions

View File

@ -172,8 +172,8 @@ app.get('/calendar/:name', async (req, res) => {
} else { } else {
// Date-based event // Date-based event
calendar.createEvent({ calendar.createEvent({
start: start, start: start.toISOString().split('T')[0], // Use only the date part
end: end, end: end.toISOString().split('T')[0], // Use only the date part
summary: summary, summary: summary,
allDay: true, // Mark as an all-day event allDay: true, // Mark as an all-day event
}); });