From 1eae3a4c0ebf4ca9344c59ef40c067baf925a56e Mon Sep 17 00:00:00 2001 From: Adrian Obelmejias Date: Fri, 4 Mar 2016 23:17:12 -0500 Subject: [PATCH] Define auth error --- src/controllers/auth.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/controllers/auth.js b/src/controllers/auth.js index 9d64e04..5616701 100644 --- a/src/controllers/auth.js +++ b/src/controllers/auth.js @@ -5,6 +5,17 @@ import config from '../../config' const router = new Router({ prefix: '/auth' }) +/** + * @apiDefine TokenError + * @apiError Unauthorized Invalid JWT token + * + * @apiErrorExample {json} Error-Response: + * HTTP/1.1 401 Unauthorized + * { + * "status": 401, + * "error": "Unauthorized" + * } + */ /** * @api {post} /auth Authenticate user