You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the new published schedule page design, we need to write new routes to retrieve and format data so it can be easily displayed in the frontend
When the user is the published schedule page, they are only viewing one season + year at a time (ex. FALL 2023). Additionally, within each day of the season, we need to group all the events in a specific day together.
Write a new route GET /published-schedule/season that will have 2 fields in req.query: year and season (SPRING, SUMMER, FALL, WINTER) and returns all events occurring in that season GROUPED BY date and ORDERED BY date ASC (chronologically)
if the query fields are not there, issue a 400 status code
the data returned for a season may look something like this
`{
date: json_array[events schedule on that day],
'2024/01/12': [
{
id: 23, // published schedule id
title: "Navigating Life",
eventType: "Life Skills",
year: "both",
startTime:
endTime:
// all fields in published schedule table
...
}
],
}`
Write a second route GET /published-schedule/date that requires one field in req.query: date in YYYY-MM-DD format. This will return all events occurring on a specific date.
Notes
You might need to create a few published events to test this functionality
For now, the cutoffs for each season will be defined as follows (we'll be making them more specific when we receive details from AISS)
Winter: December - February
Spring: March - May
Summer: June - August
Fall: September - November
To understand the usage more in the Published Schedule, talk with Kaila from the design side!
Acceptance Criteria
Test via Postman that you can retrieve Published Schedule events and that all events retrieved fit in the correct season
Instructions
GET /published-schedule/season
that will have 2 fields in req.query: year and season (SPRING, SUMMER, FALL, WINTER) and returns all events occurring in that season GROUPED BY date and ORDERED BY date ASC (chronologically)if the query fields are not there, issue a 400 status code
the data returned for a season may look something like this
`{
date: json_array[events schedule on that day],
'2024/01/12': [
{
id: 23, // published schedule id
title: "Navigating Life",
eventType: "Life Skills",
year: "both",
startTime:
endTime:
// all fields in published schedule table
...
}
],
}`
GET /published-schedule/date
that requires one field in req.query: date in YYYY-MM-DD format. This will return all events occurring on a specific date.Notes
Acceptance Criteria
Resources
As always, feel free to message Michael and Michelle if you have any questions!
The text was updated successfully, but these errors were encountered: