From 0f7176999bc037cdda7ef05c062285629c8e18b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 9 May 2019 14:32:42 +0200 Subject: [PATCH] logout JSON schema --- backend/routes/user/logout.coffee | 12 +----------- backend/routes/user/logout.schema.coffee | 11 +++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 backend/routes/user/logout.schema.coffee 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