Use cafy
This commit is contained in:
parent
f210260826
commit
17a23c3eb5
67 changed files with 202 additions and 801 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import it from '../../../it';
|
||||
import it from 'cafy';
|
||||
import AuthSess from '../../../models/auth-session';
|
||||
import serialize from '../../../serializers/auth-session';
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ import serialize from '../../../serializers/auth-session';
|
|||
*/
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
// Get 'token' parameter
|
||||
const [token, tokenErr] = it(params.token).expect.string().required().qed();
|
||||
const [token, tokenErr] = it(params.token).expect.string().required().get();
|
||||
if (tokenErr) return rej('invalid token param');
|
||||
|
||||
// Lookup session
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue