OpenSUTD / sutd-timetable

.ics generator for timetables
https://opensutd.org/sutd-timetable/
The Unlicense
3 stars 1 forks source link

URL provided by app is wrong #12

Open tlkh opened 5 years ago

tlkh commented 5 years ago

When you upload your calendar, everything seems to work fine.

However, the date (somehow) on the main app itself seems incorrect. It returns (in my case) https://us-central1-sutd-timetable.cloudfunctions.net/calendar?t=2019-1&s=1053,1055,1115,1153,1154,1158, which doesn't work. (

After changing t=2019-1 to t=2019-2 it works fine:

https://us-central1-sutd-timetable.cloudfunctions.net/calendar?t=2019-2&s=1053,1055,1115,1153,1154,1158

tlkh commented 5 years ago

Add @randName for advice haha

tlkh commented 5 years ago

So as it turns out, the term number in the URL is hardcoded in Firebase. Leaving this issue open until it is resolved permanently.

randName commented 5 years ago

The current situation, for the benefit of anyone who stumbles on this:

The value stored in Firebase was done as an override to prevent weird behaviour, but I suspect it may not actually be required since it only affects the display URL (which will probably be copied only at the start of term). Another way is to have a cloud function that updates the value when new uploads come in.