Closed thefueley closed 1 year ago
Updated endpoint for updating workouts. PUT /api/v1/workout/{plan_id}
PUT /api/v1/workout/{plan_id}
Send full contents of desired workout plan. For example:
{ "uid": "1", "name": "Krypteia", "exercises": [ { "id": "12", "sets": "3", "reps": "20", "load": "100", "exercise_id": "11" }, { "id": "13", "sets": "2", "reps": "2", "load": "100", "exercise_id": "100" }, { "sets": "3", "reps": "3", "load": "50", "exercise_id": "21" } ] }
The above request will update exercise id's 12 and 13 in this plan. It will also create a new exercise, assigning a new id. Notice there is no "id" in that element. Any remaining exercises in the workout plan are deleted.
Updated endpoint for updating workouts.
PUT /api/v1/workout/{plan_id}
Send full contents of desired workout plan. For example:
The above request will update exercise id's 12 and 13 in this plan. It will also create a new exercise, assigning a new id. Notice there is no "id" in that element. Any remaining exercises in the workout plan are deleted.