diff options
| author | mo khan <mo@mokhan.ca> | 2016-12-31 13:07:21 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-12-31 13:07:21 -0700 |
| commit | 612db04f8c409ec99c8b3ce2797ca90633b403e1 (patch) | |
| tree | e4431dd6e205418c197f03da97080f86b37ba8f2 | |
| parent | c92a6282b3b99773268830aaaf0de5d259b8ae21 (diff) | |
add workout key to json body.
| -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)); } |
