diff options
Diffstat (limited to 'app/services/commands/create-workout-command.js')
| -rw-r--r-- | app/services/commands/create-workout-command.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/services/commands/create-workout-command.js b/app/services/commands/create-workout-command.js index 5620518..7ade156 100644 --- a/app/services/commands/create-workout-command.js +++ b/app/services/commands/create-workout-command.js @@ -12,9 +12,11 @@ export default class CreateWorkoutCommand { notify(event) { const body = { - body_weight: event.body_weight, - exercise_sets_attributes: event.sets, - routine_id: event.routine_id, + workout: { + body_weight: event.body_weight, + exercise_sets_attributes: event.sets, + routine_id: event.routine_id, + } }; this.api.post('/workouts', body, this.onResponse.bind(this)); } |
