1
0
Fork 0
Commit Graph

79 Commits

Author SHA1 Message Date
Ryan Mwangi 1d4e440093 ensure path to the JSON file is absolute 2024-10-25 14:45:34 +03:00
Ryan Mwangi 9420ce1cce ensure path to the ics file is absolute 2024-10-25 14:44:43 +03:00
Ryan Mwangi d1084ea558 return the contents of the .ics file 2024-10-24 15:35:03 +03:00
Ryan Mwangi 1150778f4c save merged calendar to file 2024-10-24 15:33:58 +03:00
Ryan Mwangi 418fea84b9 parse calendar data 2024-10-24 15:30:01 +03:00
Ryan Mwangi d2d0f7fd1e filter out any failed requests 2024-10-24 15:28:13 +03:00
Ryan Mwangi 08f9f5a15d add catch block 2024-10-24 15:26:50 +03:00
Ryan Mwangi 35deb877a3 fetch calendar data for each merged calendar 2024-10-24 15:25:02 +03:00
Ryan Mwangi c898cb0b24 read the JSON file toget the source URL and other details 2024-10-24 15:22:50 +03:00
Ryan Mwangi bab040df0f check if the file is older than an hour 2024-10-24 15:21:56 +03:00
Ryan Mwangi 96e25f7169 check if .ics file exists 2024-10-24 15:20:52 +03:00
Ryan Mwangi 50ad583698 define jsonFilePath 2024-10-24 15:19:15 +03:00
Ryan Mwangi bfa61b8e77 define icsFilePath 2024-10-24 15:18:44 +03:00
Ryan Mwangi c3c7e79286 define calendarName 2024-10-24 15:18:02 +03:00
Ryan Mwangi 6d0e28486f create new end point to serve the merged calendar file and refresh if older than an hour 2024-10-24 15:16:44 +03:00
Ryan Mwangi bd3ab65003 delete saveCalendarDatajoint function 2024-10-24 15:08:11 +03:00
Ryan Mwangi 1b0f792fd6 import path into server.js 2024-10-24 15:02:01 +03:00
Ryan Mwangi 1e03f668c3 update name of merged calendars directory to calendars 2024-10-24 14:21:21 +03:00
Ryan Mwangi 3bbaeb2048 edit updateMergedCalendars function to read from the calendarFile 2024-10-23 15:52:43 +03:00
Ryan Mwangi e9569f9690 fetch calendar data from the individual JSON file 2024-10-23 15:46:58 +03:00
Ryan Mwangi 318f585689 function to save calendar data to seperate .json files 2024-10-23 15:22:01 +03:00
Ryan Mwangi 1bb8eda0ec support time based events 2024-10-22 19:22:57 +03:00
Ryan Mwangi c6117e3470 update cron job to use mergedCalendar.id when calling the updateMergedCalendars function 2024-10-22 14:35:11 +03:00
Ryan Mwangi 77f19504a2 update refresh calendar endpoint to have some error handling 2024-10-22 14:32:28 +03:00
Ryan Mwangi a3703ef485 use calendarId in updateMergedCalendars function 2024-10-22 14:29:51 +03:00
Ryan Mwangi b4674feabf endpoint to refresh the merged calender 2024-10-22 02:40:08 +03:00
Ryan Mwangi f5f23d85e0 edit server side code error message for wrong user input 2024-10-21 15:33:57 +03:00
Ryan Mwangi 3204bb8a4b update /merge endpoint to use linkGroupName input 2024-10-21 02:25:40 +03:00
Ryan Mwangi e5202791ac catch error while trying to write to calendars file 2024-10-20 01:29:38 +03:00
Ryan Mwangi 7dfa5875fe ensure mergedCalendars array exists 2024-10-20 01:28:35 +03:00
Ryan Mwangi 69a6718af8 update saveCalendarData function 2024-10-20 01:27:43 +03:00
Ryan Mwangi 0e7e3e7804 restructure calendars.json 2024-10-19 18:32:43 +03:00
Ryan Mwangi 3901a5d894 update name of function used to updateMergedCalendars 2024-10-19 17:41:06 +03:00
Ryan Mwangi 42bfb3bdd2 remove unused /:filename endpoint 2024-10-19 17:37:10 +03:00
Ryan Mwangi ae0d41dca4 remove unused code for saving file in calendars.json 2024-10-19 17:36:27 +03:00
Ryan Mwangi fe35fd3665 remove merged-calendar endpoint 2024-10-19 17:14:59 +03:00
Ryan Mwangi d43a701051 fix syntax error 2024-10-19 17:13:45 +03:00
Ryan Mwangi e6b63cd85f Modify the updateMergedCalendar function to update all merged calendars 2024-10-19 17:08:55 +03:00
Ryan Mwangi 896738a123 import crypto 2024-10-19 17:06:09 +03:00
Ryan Mwangi 8cdeba3d93 edit updateMergedCalendar function 2024-10-19 02:21:20 +03:00
Ryan Mwangi ecd4b3835c serve the merged calendar file 2024-10-18 16:43:13 +03:00
Ryan Mwangi 4b27d84f92 function to add calendarData to calendars,json 2024-10-18 15:43:04 +03:00
Ryan Mwangi 2d3c90aa38 generate URL for merged calendar using calendar ID 2024-10-18 15:36:30 +03:00
Ryan Mwangi 84f4d4b855 Save merged calendar to file with unique identifier 2024-10-18 15:33:21 +03:00
Ryan Mwangi 6c9af1f4e4 generate a unique identifier for each set of calendars 2024-10-18 15:30:53 +03:00
Ryan Mwangi c94867ded6 get regular refresh up and running 2024-10-15 15:53:08 +03:00
Ryan Mwangi 4cac613470 edit updateMergedCalendar function and update cron to run every minute for testing 2024-10-15 15:07:28 +03:00
Ryan Mwangi d06c2669ce use one post request on server instead of two 2024-10-15 14:17:07 +03:00
Ryan Mwangi fcf626036d Modifying the updateMergedCalendar function to read the link group data from the calendars.json file and use it to fetch the calendar data. 2024-10-14 16:03:40 +03:00
Ryan Mwangi c80064f135 Write the updated data back to calendars.json 2024-10-14 15:54:41 +03:00