mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
* Improved API documentation for hall * Fixes typos, removes apiHeader definitions and curl example * Fixes @apiParam and capitalization errors. Moves @apiDefines to website/server/api-doc.js
This commit is contained in:
committed by
Sabe Jones
parent
f6f99ec57e
commit
f27706cb4b
@@ -13,3 +13,59 @@
|
||||
/**
|
||||
* @apiDefine Query Query Parameters
|
||||
*/
|
||||
|
||||
/**
|
||||
* @apiDefine Admin Moderators
|
||||
* Contributors of tier 8 or higher can use this route.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @apiDefine NoAuthHeaders Missing authentication headers
|
||||
*
|
||||
* @apiError (401) {NotAuthorized} NoAuthHeaders Missing authentication headers
|
||||
*
|
||||
* @apiErrorExample Missing authentication headers
|
||||
* {
|
||||
* "success": false,
|
||||
* "error": "NotAuthorized",
|
||||
* "message": "Missing authentication headers."
|
||||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* @apiDefine NoAccount There is no account that uses those credentials.
|
||||
*
|
||||
* @apiError (401) {NotAuthorized} NoAccount There is no account that uses those credentials
|
||||
*
|
||||
* @apiErrorExample No account
|
||||
* {
|
||||
* "success": false,
|
||||
* "error": "NotAuthorized",
|
||||
* "message": "There is no account that uses those credentials."
|
||||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* @apiDefine NotAdmin You don't have admin access.
|
||||
*
|
||||
* @apiError (401) {NotAuthorized} NotAdmin User is not an admin
|
||||
*
|
||||
* @apiErrorExample No admin access
|
||||
* {
|
||||
* "success": false,
|
||||
* "error": "NotAuthorized",
|
||||
* "message": "You don't have admin access."
|
||||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* @apiDefine NoUser No user
|
||||
* @apiError (404) {NotFound} NoUser The specified user could not be found.
|
||||
*
|
||||
* @apiErrorExample No user
|
||||
* {
|
||||
* "success": false,
|
||||
* "error": "NotFound",
|
||||
* "message": "User with id \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" not found."
|
||||
* }
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user