diff --git a/backend/routes/user/logout.coffee b/backend/routes/user/logout.coffee index 65d9adf..9a03466 100644 --- a/backend/routes/user/logout.coffee +++ b/backend/routes/user/logout.coffee @@ -6,17 +6,7 @@ session = (require '../../session') module.exports = url: '/user/logout' method: 'POST' - schema: - body: - session: type: 'string' - response: - 200: - type: 'object' - required: ['success'] - properties: - success: - type: 'boolean' - const: true + schema: (require './logout.schema') handler: (request, reply) -> new Promise (resolve) -> diff --git a/backend/routes/user/logout.schema.coffee b/backend/routes/user/logout.schema.coffee new file mode 100644 index 0000000..7e8f40e --- /dev/null +++ b/backend/routes/user/logout.schema.coffee @@ -0,0 +1,11 @@ +module.exports = + body: + session: type: 'string' + response: + 200: + type: 'object' + required: ['success'] + properties: + success: + type: 'boolean' + const: true