finish linting server

This commit is contained in:
Matteo Pagliazzi
2019-10-11 13:03:05 +02:00
parent 5aa371bf90
commit e09a70570e
40 changed files with 681 additions and 256 deletions

View File

@@ -56,16 +56,20 @@ api.verifyUsername = {
/**
* @api {post} /api/v4/user/auth/local/register Register
* @apiDescription Register a new user with email, login name, and password or attach local auth to a social user
* @apiDescription Register a new user with email, login name, and password
* or attach local auth to a social user
* @apiName UserRegisterLocal
* @apiGroup User
*
* @apiParam (Body) {String} username Login name of the new user. Must be 1-36 characters, containing only a-z, 0-9, hyphens (-), or underscores (_).
* @apiParam (Body) {String} username Login name of the new user.
* Must be 1-36 characters, containing only
* a-z, 0-9, hyphens (-), or underscores (_).
* @apiParam (Body) {String} email Email address of the new user
* @apiParam (Body) {String} password Password for the new user
* @apiParam (Body) {String} confirmPassword Password confirmation
*
* @apiSuccess {Object} data The user object, if local auth was just attached to a social user then only user.auth.local
* @apiSuccess {Object} data The user object, if local auth was just
* attached to a social user then only user.auth.local
*/
api.registerLocal = {
method: 'POST',

View File

@@ -111,7 +111,8 @@ api.conversations = {
* @api {get} /api/v4/inbox/paged-messages Get inbox messages for a user
* @apiName GetInboxMessages
* @apiGroup Inbox
* @apiDescription Get inbox messages for a user. Entries already populated with the correct `sent` - information
* @apiDescription Get inbox messages for a user.
* Entries already populated with the correct `sent` - information
*
* @apiParam (Query) {Number} page Load the messages of the selected Page - 10 Messages per Page
* @apiParam (Query) {GUID} conversation Loads only the messages of a conversation

View File

@@ -5,7 +5,8 @@ const api = {};
/**
* @api {post} /api/v4/members/flag-private-message/:messageId Flag a private message
* @apiDescription An email and slack message are sent to the moderators about every flagged message.
* @apiDescription An email and slack message are sent
* to the moderators about every flagged message.
* @apiName FlagPrivateMessage
* @apiGroup Member
*
@@ -18,13 +19,17 @@ const api = {};
* @apiSuccess {Object} data.likes The likes of the message (always an empty object)
* @apiSuccess {Object} data.flags The flags of the message
* @apiSuccess {Number} data.flagCount The number of flags the message has
* @apiSuccess {UUID} data.uuid The User ID of the author of the message, or of the recipient if `sent` is true
* @apiSuccess {String} data.user The Display Name of the author of the message, or of the recipient if `sent` is true
* @apiSuccess {String} data.username The Username of the author of the message, or of the recipient if `sent` is true
* @apiSuccess {UUID} data.uuid The User ID of the author of the message,
* or of the recipient if `sent` is true
* @apiSuccess {String} data.user The Display Name of the author of the message,
* or of the recipient if `sent` is true
* @apiSuccess {String} data.username The Username of the author of the message,
* or of the recipient if `sent` is true
*
* @apiUse MessageNotFound
* @apiUse MessageIdRequired
* @apiError (400) {BadRequest} messageGroupChatFlagAlreadyReported You have already reported this message
* @apiError (400) {BadRequest} messageGroupChatFlagAlreadyReported You have already
* reported this message
*/
api.flagPrivateMessage = {
method: 'POST',

View File

@@ -17,7 +17,8 @@ const api = {};
* @apiName UserGet
* @apiGroup User
*
* @apiDescription The user profile contains data related to the authenticated user including (but not limited to);
* @apiDescription The user profile contains data related to the authenticated user
* including (but not limited to);
* Achievements
* Authentications (including types and timestamps)
* Challenges
@@ -38,7 +39,9 @@ const api = {};
* Tags
* TasksOrder (list of all ids for dailys, habits, rewards and todos)
*
* @apiParam (Query) {String} [userFields] A list of comma separated user fields to be returned instead of the entire document. Notifications are always returned.
* @apiParam (Query) {String} [userFields] A list of comma separated user fields
* to be returned instead of the entire document.
* Notifications are always returned.
*
* @apiExample {curl} Example use:
* curl -i https://habitica.com/api/v3/user?userFields=achievements,items.mounts
@@ -85,7 +88,8 @@ api.getUser = {
*
* @apiSuccess {Object} data The updated user object, the result is identical to the get user call
*
* @apiError (401) {NotAuthorized} messageUserOperationProtected Returned if the change is not allowed.
* @apiError (401) {NotAuthorized} messageUserOperationProtected Returned if the
* change is not allowed.
*
* @apiErrorExample {json} Error-Response:
* {

View File

@@ -19,8 +19,13 @@ const api = {};
* @apiGroup User
*
* @apiParam (Path) {String=fireball, mpheal, earth, frost, smash, defensiveStance, valorousPresence, intimidate, pickPocket, backStab, toolsOfTrade, stealth, heal, protectAura, brightness, healAll} spellId The skill to cast.
* @apiParam (Query) {UUID} targetId Query parameter, necessary if the spell is cast on a party member or task. Not used if the spell is case on the user or the user's current party.
* @apiParam (Path) {String=fireball, mpheal, earth, frost, smash,
* defensiveStance, valorousPresence, intimidate, pickPocket,
* backStab, toolsOfTrade, stealth, heal, protectAura, brightness,
* healAll} spellId The skill to cast.
* @apiParam (Query) {UUID} targetId Query parameter, necessary if the spell
* is cast on a party member or task.
* Not used if the spell is case on the user or the user's current party.
* @apiParamExample {json} Query example:
* Cast "Pickpocket" on a task:
* https://habitica.com/api/v3/user/class/cast/pickPocket?targetId=fd427623...
@@ -28,7 +33,9 @@ const api = {};
* Cast "Tools of the Trade" on the party:
* https://habitica.com/api/v3/user/class/cast/toolsOfTrade
*
* @apiSuccess data Will return the modified targets. For party members only the necessary fields will be populated. The user is always returned.
* @apiSuccess data Will return the modified targets.
* For party members only the necessary fields will be populated.
* The user is always returned.
*
* @apiDescription Skill Key to Name Mapping
* Mage