✌️
This commit is contained in:
parent
3d536ddb3f
commit
31f36fa618
64 changed files with 241 additions and 256 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import it from 'cafy';
|
||||
import $ from 'cafy';
|
||||
import App from '../../../models/app';
|
||||
import AuthSess from '../../../models/auth-session';
|
||||
import AccessToken from '../../../models/access-token';
|
||||
|
|
@ -51,7 +51,7 @@ import serialize from '../../../serializers/user';
|
|||
*/
|
||||
module.exports = (params) => new Promise(async (res, rej) => {
|
||||
// Get 'app_secret' parameter
|
||||
const [appSecret, appSecretErr] = it(params.app_secret).expect.string().required().get();
|
||||
const [appSecret, appSecretErr] = $(params.app_secret).string().$;
|
||||
if (appSecretErr) return rej('invalid app_secret param');
|
||||
|
||||
// Lookup app
|
||||
|
|
@ -64,7 +64,7 @@ module.exports = (params) => new Promise(async (res, rej) => {
|
|||
}
|
||||
|
||||
// Get 'token' parameter
|
||||
const [token, tokenErr] = it(params.token).expect.string().required().get();
|
||||
const [token, tokenErr] = $(params.token).string().$;
|
||||
if (tokenErr) return rej('invalid token param');
|
||||
|
||||
// Fetch token
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue