From 612db04f8c409ec99c8b3ce2797ca90633b403e1 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 31 Dec 2016 13:07:21 -0700 Subject: add workout key to json body. --- app/services/commands/create-workout-command.js | 8 +++++--- 1 file 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)); } -- cgit v1.2.3