logout JSON schema
This commit is contained in:
parent
0d604ef320
commit
0f7176999b
2 changed files with 12 additions and 11 deletions
|
@ -6,17 +6,7 @@ session = (require '../../session')
|
||||||
module.exports =
|
module.exports =
|
||||||
url: '/user/logout'
|
url: '/user/logout'
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
schema:
|
schema: (require './logout.schema')
|
||||||
body:
|
|
||||||
session: type: 'string'
|
|
||||||
response:
|
|
||||||
200:
|
|
||||||
type: 'object'
|
|
||||||
required: ['success']
|
|
||||||
properties:
|
|
||||||
success:
|
|
||||||
type: 'boolean'
|
|
||||||
const: true
|
|
||||||
|
|
||||||
handler: (request, reply) ->
|
handler: (request, reply) ->
|
||||||
new Promise (resolve) ->
|
new Promise (resolve) ->
|
||||||
|
|
11
backend/routes/user/logout.schema.coffee
Normal file
11
backend/routes/user/logout.schema.coffee
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
module.exports =
|
||||||
|
body:
|
||||||
|
session: type: 'string'
|
||||||
|
response:
|
||||||
|
200:
|
||||||
|
type: 'object'
|
||||||
|
required: ['success']
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: 'boolean'
|
||||||
|
const: true
|
Reference in a new issue