From a2c78514acfe38623dc59fee4c4040b76709acae Mon Sep 17 00:00:00 2001 From: Tosuke Date: Fri, 6 Jan 2017 01:28:59 +0900 Subject: [PATCH] [Swagger]Add /auth/accept --- src/api/endpoints/auth/accept.js | 23 +++++++++++++++++++++++ swagger.js | 3 +++ 2 files changed, 26 insertions(+) diff --git a/src/api/endpoints/auth/accept.js b/src/api/endpoints/auth/accept.js index 7c45650c6..e584513c0 100644 --- a/src/api/endpoints/auth/accept.js +++ b/src/api/endpoints/auth/accept.js @@ -7,6 +7,29 @@ import rndstr from 'rndstr'; import AuthSess from '../../models/auth-session'; import Userkey from '../../models/userkey'; +/** + * @swagger + * /auth/accept: + * post: + * summary: Accept a session + * parameters: + * - $ref: "#/parameters/ShouldSecureKey" + * - + * name: token + * description: Session Token + * in: formData + * required: true + * type: string + * responses: + * 204: + * description: OK + * + * default: + * description: Failed + * schema: + * $ref: "#/definitions/Error" + */ + /** * Accept * diff --git a/swagger.js b/swagger.js index 91b96e1f4..16e1a0bf0 100644 --- a/swagger.js +++ b/swagger.js @@ -7,6 +7,9 @@ const yaml = require('js-yaml'); const apiRoot = './src/api/endpoints'; const files = [ 'users.js', + //auth + 'auth/accept.js', + //auth/session 'auth/session/generate.js', 'auth/session/show.js', 'auth/session/userkey.js',