diff --git a/server/features/forcedBreakPoint.js b/server/features/forcedBreakPoint.js index 891d3fa..bfc118b 100644 --- a/server/features/forcedBreakPoint.js +++ b/server/features/forcedBreakPoint.js @@ -6,8 +6,6 @@ // @returns : the calender in string format // @notes : Be aware the time is based on the server time not UTC -const regex = /^LAST-MODIFIED:.*/gm; - /** * Force events to update format once a day * @param {string} cal @@ -19,6 +17,7 @@ function run(cal) { // so this will manual set the last modified each day to force an update in the calender app // NB. it will stop doing this at 4 am so any changes in the day will be recognised and updated live // NB. 3 hour window set as the ICS is set to refresh evert 2 hours, so this should affect all users + const regex = /^LAST-MODIFIED:.*/gm; const date = new Date(); const hour = date.getHours(); if (hour >= 1 && hour <= 4) { diff --git a/server/features/replaceCodeName.js b/server/features/replaceCodeName.js index b1f52aa..2207c4c 100644 --- a/server/features/replaceCodeName.js +++ b/server/features/replaceCodeName.js @@ -6,14 +6,13 @@ // @returns : the calender in string format -const pattern = /SUMMARY:[^\/]*\//g // REGEX to search the ICAL for the course code - /** * List unique course names in the string * @param {string} cal * @returns List of unique course codes */ function parseCourseCodes(cal) { + const pattern = /SUMMARY:[^\/]*\//g // REGEX to search the ICAL for the course code const uniqueMatches = new Set(); let match;