From ac52da5be275b71c987c6baefb92769829904783 Mon Sep 17 00:00:00 2001 From: Alys Date: Sat, 8 Feb 2020 14:55:21 +1000 Subject: [PATCH] fix lines that are too long Each line was fixed by one of these: - changing the wording - breaking into separate lines - adding eslint-disable-line max-len (necessary for `@api ` lines because a line break there causes the first part of the text to not be displayed on the apidocs website) --- website/server/controllers/api-v3/hall.js | 2 +- website/server/controllers/api-v3/tasks.js | 3 ++- website/server/controllers/api-v3/tasks/groups.js | 2 +- website/server/controllers/api-v3/user.js | 12 +++++++----- website/server/controllers/api-v3/user/stats.js | 3 ++- website/server/controllers/top-level/email.js | 3 ++- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/website/server/controllers/api-v3/hall.js b/website/server/controllers/api-v3/hall.js index 15cf620c24..81b6c97999 100644 --- a/website/server/controllers/api-v3/hall.js +++ b/website/server/controllers/api-v3/hall.js @@ -154,7 +154,7 @@ const heroAdminFields = 'contributor balance profile.name purchased items auth f * @apiGroup Hall * @apiPermission Admin * - * @apiDescription Returns the profile of the given user. The user does not need to be a contributor. + * @apiDescription Returns the profile of the given user. User does not need to be a contributor. * * @apiSuccess {Object} data The user object * diff --git a/website/server/controllers/api-v3/tasks.js b/website/server/controllers/api-v3/tasks.js index 6787b60a8f..c2bd6c3ca8 100644 --- a/website/server/controllers/api-v3/tasks.js +++ b/website/server/controllers/api-v3/tasks.js @@ -1479,7 +1479,8 @@ api.unlinkOneTask = { /** * @api {post} /api/v3/tasks/clearCompletedTodos Delete user's completed todos * @apiName ClearCompletedTodos - * @apiDescription Deletes all of a user's completed To-Dos except those belonging to active Challenges and Group Plans + * @apiDescription Deletes all of a user's completed To-Dos except + * those belonging to active Challenges and Group Plans. * @apiGroup Task * * @apiExample {curl} Example call: diff --git a/website/server/controllers/api-v3/tasks/groups.js b/website/server/controllers/api-v3/tasks/groups.js index a00a8c35f4..77d44dd587 100644 --- a/website/server/controllers/api-v3/tasks/groups.js +++ b/website/server/controllers/api-v3/tasks/groups.js @@ -112,7 +112,7 @@ api.getGroupTasks = { }; /** - * @api {post} /api/v3/group/:groupId/tasks/:taskId/move/to/:position Move a group task to a specified position + * @api {post} /api/v3/group/:groupId/tasks/:taskId/move/to/:position Move group task to new position * @apiDescription Moves a group task to a specified position * @apiVersion 3.0.0 * @apiName GroupMoveTask diff --git a/website/server/controllers/api-v3/user.js b/website/server/controllers/api-v3/user.js index fd8d60cc86..f464f4aae8 100644 --- a/website/server/controllers/api-v3/user.js +++ b/website/server/controllers/api-v3/user.js @@ -91,7 +91,7 @@ api.getUser = { }; /** - * @api {get} /api/v3/user/inventory/buy Get the gear items available for purchase for the authenticated user + * @api {get} /api/v3/user/inventory/buy Get equipment/gear items available for user to purchase * @apiName UserGetBuyList * @apiGroup User * @@ -244,10 +244,12 @@ api.updateUser = { * * @apiError {BadRequest} MissingPassword Missing password. * @apiError {BadRequest} NotAuthorized Wrong password. - * @apiError {BadRequest} NotAuthorized Please type DELETE in all capital letters to delete your account. + * @apiError {BadRequest} NotAuthorized Please type DELETE in all capital letters to + * delete your account. * @apiError {BadRequest} BadRequest Account deletion feedback is limited to 10,000 characters. * For lengthy feedback, email ${TECH_ASSISTANCE_EMAIL}. - * @apiError {BadRequest} NotAuthorized You have an active subscription, cancel your plan before deleting your account. + * @apiError {BadRequest} NotAuthorized You have an active subscription, + * cancel your plan before deleting your account. * * @apiErrorExample {json} * { @@ -707,7 +709,7 @@ api.buyQuest = { }; /** - * @api {post} /api/v3/user/buy-special-spell/:key Buy special item (card, avatar transformation, etc) + * @api {post} /api/v3/user/buy-special-spell/:key Buy special item (card, avatar transformation) * @apiDescription Includes gift cards (e.g., birthday card), and avatar Transformation * Items and their antidotes (e.g., Snowball item and Salt reward). * @apiName UserBuySpecialSpell @@ -1670,7 +1672,7 @@ api.togglePinnedItem = { }; /** - * @api {post} /api/v3/user/move-pinned-item/:type/:path/move/to/:position Move a pinned item in the rewards column to a new position after being sorted + * @api {post} /api/v3/user/move-pinned-item/:type/:path/move/to/:position Move a pinned item in the rewards column to a new position after being sorted // eslint-disable-line max-len * @apiName MovePinnedItem * @apiGroup User * diff --git a/website/server/controllers/api-v3/user/stats.js b/website/server/controllers/api-v3/user/stats.js index 08c04c337d..faed3ff3aa 100644 --- a/website/server/controllers/api-v3/user/stats.js +++ b/website/server/controllers/api-v3/user/stats.js @@ -5,9 +5,10 @@ import { authWithHeaders } from '../../../middlewares/auth'; const api = {}; /** - * @api {post} /api/v3/user/allocate Allocate a single Stat Point (previously called Attribute Point) + * @api {post} /api/v3/user/allocate Allocate a single Stat Point * @apiName UserAllocate * @apiGroup User + * @apiDescription Allocates a single Stat Point (previously called Attribute Point). * * @apiParam (Query) {String="str","con","int","per"} stat The Stat to increase. Default is 'str' * diff --git a/website/server/controllers/top-level/email.js b/website/server/controllers/top-level/email.js index b52920cee1..5062961cd6 100644 --- a/website/server/controllers/top-level/email.js +++ b/website/server/controllers/top-level/email.js @@ -15,7 +15,8 @@ const api = {}; * that will unsubscribe the user from emails. * Does not require authentication. * - * @apiParam (Query) {String} code An unsubscription code that contains an encrypted User ID or email address + * @apiParam (Query) {String} code An unsubscription code that contains an encrypted User ID or + * email address * * @apiSuccess {String} Webpage An html success message *