Commit 612db04

mo khan <mo@mokhan.ca>
2016-12-31 20:07:21
add workout key to json body.
1 parent c92a628
Changed files (1)
app
services
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));
   }