rit-sse / OneRepoToRuleThemAll

👑 The SSE Website, Forged from the Shadows of Mordor
https://sse.rit.edu
MIT License
13 stars 22 forks source link

Some events have no title when exported to ical #310

Open galenguyer opened 4 years ago

galenguyer commented 4 years ago

Example: Narwhal Systems visit on Feb 18:

gavrielrh commented 4 years ago

This is pretty weird. So the ics (ical) file is served via an API request to our node-api, more specifically the [GET] / route where the request header accepts ics: https://github.com/rit-sse/node-api/blob/ef75c7c8aeb013fbe99bf32b1914f0a1f4e716de/routes/events.js#L26 All the site does is have an anchor to the aforementioned endpoint: https://github.com/rit-sse/OneRepoToRuleThemAll/blob/19cdec2e13736c79e209ccd9ee858703e792c1a9/app/js/events/Page.jsx#L28

This route grabs all events from the db via sequelize, scoped by whatever the request specifies and then just sends the events as a calendar.ics file. There isn't any specific logic that mutates how an event would display, so I'm really not sure why your event is showing up with no title.

I double checked the prod-db and your event has all of the fields I would expect it to have. The API also returns back normal results: https://sse.rit.edu/api/v2/events?name=Narwhal%20Systems

If you'd like to poke around and see what you can figure out, the Event model is located here: https://github.com/rit-sse/node-api/blob/ef75c7c8aeb013fbe99bf32b1914f0a1f4e716de/models/event.js#L10