instructions.txt 1.1 KB

12345678910111213141516171819202122232425
  1. Create the following routes:
  2. POST /workout/{workout_id}/session
  3. Creates a new session
  4. 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.
  5. Requires user auth (ensure user owns workout)
  6. GET /workout/{workout_id}/session/{session_id}
  7. Returns a single, full session
  8. Requires user auth (ensure user owns workout/session)
  9. GET /workout/{workout_id}/session
  10. Takes in a query
  11. Returns an array of all sessions that match the query and are part of the workout
  12. Limit to 50 results
  13. Return array of results, plus a field that contains the count of all sessions for the workout, for pagination
  14. Requires user auth (ensure ownership of workout)
  15. Queries:
  16. start: date to start searching, optional, beginning of time if not provided
  17. end: date to end searching, optional, end of time if not provided
  18. page: 1-indexed, used for pagination
  19. DELETE /workout/{workout_id}/session/{session_id}
  20. Delete the workout
  21. Requires user auth (ensure user owns workout/session)