diff --git a/lib/user.js b/lib/user.js index 39ba7da..d0c7b3f 100644 --- a/lib/user.js +++ b/lib/user.js @@ -64,10 +64,7 @@ class User { async create(args) { // console.log(args) const u = await this.get({ id: args.id, gid: args.gid }) - if (u.length === 1) { - console.log(u) - return u[0].id - } + if (u.length === 1) return u[0].id if (args.password) { if (!args.pass_salt) args.pass_salt = this.generateSalt() diff --git a/routes/session.js b/routes/session.js index 11a56a1..c6d179b 100644 --- a/routes/session.js +++ b/routes/session.js @@ -12,7 +12,7 @@ module.exports = (server) => { path: '/session', options: { response: { - schema: validate.user.sessionOut, + schema: validate.session.GET, }, tags: ['api'], }, @@ -40,10 +40,10 @@ module.exports = (server) => { options: { auth: { mode: 'try' }, validate: { - payload: validate.user.sessionPOST, + payload: validate.session.POST, }, response: { - schema: validate.user.sessionOut, + schema: validate.session.GET, }, tags: ['api'], }, @@ -93,7 +93,7 @@ module.exports = (server) => { }, options: { response: { - schema: validate.user.sessionOut, + schema: validate.session.GET, }, tags: ['api'], },