Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Published Schedule and Day backend routes #49

Closed
h0ethan04 opened this issue Feb 11, 2024 · 0 comments · Fixed by #50
Closed

Update Published Schedule and Day backend routes #49

h0ethan04 opened this issue Feb 11, 2024 · 0 comments · Fixed by #50
Assignees

Comments

@h0ethan04
Copy link
Contributor

h0ethan04 commented Feb 11, 2024

Information:

Add GET, POST, PUT, DELETE basic routes for Day table
Update Published Schedule routes:

  • Add "Day" information to returned data of /season and /date as JSON object at same level as date and events.
  • Update POST request to require day id (second passed parameter), and accept as the cohort parameter one or more of the following strings {"junior", "senior", "both"} and convert the string into the appropriate cohort year.
  • Update PUT request to take day id

Acceptance Criteria:

  • Day routes work and return information about the day
  • Published Schedule post request should accept one or more of {"junior", "senior", "both"} as a valid query parameter
  • Published Schedule /season route should return an array of json with the following format
[
  {
          "date": "2024-02-26T08:00:00.000Z",
          "day": {
              // information from related day
          }
          "events": [
              {
                  "id": 14,
                  "title": "title2",
                  "eventType": "workshop",
                  "year": "junior",
                  "startTime": "2024-02-26T01:05:34.128724",
                  "endTime": "2024-02-26T01:05:34.128724",
                  "confirmed": false,
                  "confirmedOn": "2024-02-26",
                  "cohort": [
                      "2024"
                  ],
                  "notes": null
              }
          ]
      }
]
  • Published Schedule /date route should return a JSON object with the following format:
{
  day: { 
    // day information 
  }
  events: [
      {
          "id": 14,
          "title": "title2",
          "eventType": "workshop",
          "year": "junior",
          "startTime": "2024-02-26T09:05:34.128Z",
          "endTime": "2024-02-26T09:05:34.128Z",
          "confirmed": false,
          "confirmedOn": "2024-02-26T08:00:00.000Z",
          "cohort": [
              "2024"
          ],
          "notes": null
      },
      { 
          // other events
      }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants