@codetanzania/majifix-common
Version:
Common utilities for majifix
61 lines (53 loc) • 1.39 kB
JavaScript
/*
* ------------------------------------------------
* Headers
* ------------------------------------------------
*/
/**
* @apiDefine RequestHeaders
* @apiHeader {String} [Accept=application/json] Accepted content type
* @apiHeader {String} Authorization Authorization token
* @apiHeader {String} [Accept-Encoding='gzip, deflate'] Accepted encoding type
*/
/**
* @apiDefine RequestHeadersExample
* @apiHeaderExample {json} Header-Example:
* {
* "Accept": "application/json"
* "Authorization": "Bearer ey6utFreRdy5"
* "Accept-Encoding": "gzip, deflate"
* }
*/
/*
* ----------------------------------------------------
* Errors
* ----------------------------------------------------
*/
/**
* @apiDefine JWTError
* @apiError JWTExpired Authorization token has expired
*/
/**
* @apiDefine JWTErrorExample
* @apiErrorExample {json} Error-Response:
* HTTP/1.1 403 Forbidden
* {
* "success":false,
* "message :"jwt expired",
* "error":{}
* }
*/
/**
* @apiDefine AuthorizationHeaderError
* @apiError AuthorizationHeaderRequired Authorization header is required
*/
/**
* @apiDefine AuthorizationHeaderErrorExample
* @apiErrorExample {json} Error-Response:
* HTTP/1.1 403 Forbidden
* {
* "success":false,
* "message :"Authorization header required",
* "error":{}
* }
*/