Просмотр исходного кода

Create the documentation for new workoutout creation.

Lee Morgan 1 год назад
Родитель
Сommit
4d64a5dd4f
1 измененных файлов с 31 добавлено и 0 удалено
  1. 31 0
      documentation/data.js

+ 31 - 0
documentation/data.js

@@ -130,5 +130,36 @@ window.data = [
                 options: ["weights"]
             }
         ]
+    },
+    {
+        type: "route",
+        id: "createWorkout",
+        title: "Create",
+        url: "POST /workout",
+        auth: true,
+        description: "Create a new workout for a user",
+        requestBody: [
+            {
+                name: "exercises",
+                type: "[Object]",
+                desc: "List of all exercises for the workout. Contains a name and an enum 'type'"
+            },
+            {
+                name: "exercises.name",
+                type: "String",
+                desc: "Name of the exercise"
+            },
+            {
+                name: "exercises.type",
+                type: "String",
+                desc: "Enum describing what type of exercise it is",
+                options: ["weights"]
+            }
+        ],
+        responseBody: [{
+            name: "N/A",
+            type: "Workout",
+            desc: "Workout object"
+        }]
     }
 ]