| 12345678910111213141516171819202122232425 |
- Create the following routes:
- POST /workout/{workout_id}/session
- Creates a new session
- The session will be administered on the front-end, so that will only create it after the session is complete in order to store the data.
- Requires user auth (ensure user owns workout)
- GET /workout/{workout_id}/session/{session_id}
- Returns a single, full session
- Requires user auth (ensure user owns workout/session)
- GET /workout/{workout_id}/session
- Takes in a query
- Returns an array of all sessions that match the query and are part of the workout
- Limit to 50 results
- Return array of results, plus a field that contains the count of all sessions for the workout, for pagination
- Requires user auth (ensure ownership of workout)
- Queries:
- start: date to start searching, optional, beginning of time if not provided
- end: date to end searching, optional, end of time if not provided
- page: 1-indexed, used for pagination
- DELETE /workout/{workout_id}/session/{session_id}
- Delete the workout
- Requires user auth (ensure user owns workout/session)
|