From 4ceab38d0b7bc9026ad7548b87aaf771971405d9 Mon Sep 17 00:00:00 2001 From: Alys Date: Mon, 16 May 2016 06:37:31 +1000 Subject: [PATCH] fix typos and missing information in apidocs - fixes https://github.com/HabitRPG/habitrpg/issues/7277 (#7282) --- website/server/controllers/api-v3/auth.js | 4 ++-- website/server/controllers/api-v3/modelsPaths.js | 2 +- website/server/controllers/api-v3/quests.js | 2 +- website/server/controllers/api-v3/tasks.js | 2 +- website/server/controllers/api-v3/user.js | 14 +++++++------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/server/controllers/api-v3/auth.js b/website/server/controllers/api-v3/auth.js index 7295cce9b7..f8eabf4c82 100644 --- a/website/server/controllers/api-v3/auth.js +++ b/website/server/controllers/api-v3/auth.js @@ -373,7 +373,7 @@ api.updatePassword = { }; /** - * @api {post} /api/v3/user/reset-password Reser password + * @api {post} /api/v3/user/reset-password Reset password * @apiDescription Reset the user password * @apiVersion 3.0.0 * @apiName ResetPassword @@ -427,7 +427,7 @@ api.resetPassword = { /** * @api {put} /api/v3/user/auth/update-email Update email - * @apiDescription Che the user email + * @apiDescription Change the user email address * @apiVersion 3.0.0 * @apiName UpdateEmail * @apiGroup User diff --git a/website/server/controllers/api-v3/modelsPaths.js b/website/server/controllers/api-v3/modelsPaths.js index b14d88b2b7..dc168b98b4 100644 --- a/website/server/controllers/api-v3/modelsPaths.js +++ b/website/server/controllers/api-v3/modelsPaths.js @@ -6,7 +6,7 @@ let tasksModels = ['habit', 'daily', 'todo', 'reward']; let allModels = ['user', 'tag', 'challenge', 'group'].concat(tasksModels); /** - * @api {get} /api/v3s/models/:model/paths Get all paths for the specified model. + * @api {get} /api/v3/models/:model/paths Get all paths for the specified model. * @apiDescription Doesn't require authentication * @apiVersion 3.0.0 * @apiName GetUserModelPaths diff --git a/website/server/controllers/api-v3/quests.js b/website/server/controllers/api-v3/quests.js index 832e90915a..9107fda8d6 100644 --- a/website/server/controllers/api-v3/quests.js +++ b/website/server/controllers/api-v3/quests.js @@ -249,7 +249,7 @@ api.rejectQuest = { /** - * @api {post} /api/v3/groups/:groupId/quests/force-start Accept a pending quest + * @api {post} /api/v3/groups/:groupId/quests/force-start Force-start a pending quest * @apiVersion 3.0.0 * @apiName ForceQuestStart * @apiGroup Group diff --git a/website/server/controllers/api-v3/tasks.js b/website/server/controllers/api-v3/tasks.js index a6a25fd7ff..3ed454c666 100644 --- a/website/server/controllers/api-v3/tasks.js +++ b/website/server/controllers/api-v3/tasks.js @@ -54,7 +54,7 @@ async function _createTasks (req, res, user, challenge) { } /** - * @api {post} /api/v3/tasks/user Create a new task the user. + * @api {post} /api/v3/tasks/user Create a new task belonging to the user. * @apiDescription Can be passed an object to create a single task or an array of objects to create multiple tasks. * @apiVersion 3.0.0 * @apiName CreateUserTasks diff --git a/website/server/controllers/api-v3/user.js b/website/server/controllers/api-v3/user.js index 6307b57293..d13b853176 100644 --- a/website/server/controllers/api-v3/user.js +++ b/website/server/controllers/api-v3/user.js @@ -177,7 +177,7 @@ api.updateUser = { }; /** - * @api {delete} /api/v3/user DELETE an authenticated user's account + * @api {delete} /api/v3/user Delete an authenticated user's account * @apiVersion 3.0.0 * @apiName UserDelete * @apiGroup User @@ -240,7 +240,7 @@ function _cleanChecklist (task) { } /** - * @api {get} /api/v3/user/anonymized + * @api {get} /api/v3/user/anonymized Get anonymized user data * @apiVersion 3.0.0 * @apiName UserGetAnonymized * @apiGroup User @@ -886,12 +886,12 @@ api.userOpenMysteryItem = { }; /* -* @api {post} /api/v3/user/webhook +* @api {post} /api/v3/user/webhook Create a new webhook * @apiVersion 3.0.0 * @apiName UserAddWebhook * @apiGroup User * -* @apiParam {string} url Body parameter - The webhook's urò +* @apiParam {string} url Body parameter - The webhook's URL * @apiParam {boolean} enabled Body parameter - If the webhook should be enabled * * @apiSuccess {Object} data The created webhook @@ -909,13 +909,13 @@ api.addWebhook = { }; /* -* @api {put} /api/v3/user/webhook/:id +* @api {put} /api/v3/user/webhook/:id Edit a webhook * @apiVersion 3.0.0 * @apiName UserUpdateWebhook * @apiGroup User * * @apiParam {UUID} id The id of the webhook to update -* @apiParam {string} url Body parameter - The webhook's urò +* @apiParam {string} url Body parameter - The webhook's URL * @apiParam {boolean} enabled Body parameter - If the webhook should be enabled * * @apiSuccess {Object} data The updated webhook @@ -933,7 +933,7 @@ api.updateWebhook = { }; /* -* @api {delete} /api/v3/user/webhook/:id +* @api {delete} /api/v3/user/webhook/:id Delete a webhook * @apiVersion 3.0.0 * @apiName UserDeleteWebhook * @apiGroup User