wip
This commit is contained in:
@ -32,7 +32,7 @@ import { ILocalUser } from '../../../../models/user';
|
||||
/**
|
||||
* Accept
|
||||
*/
|
||||
module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||
// Get 'token' parameter
|
||||
const [token, tokenErr] = $.str.get(params.token);
|
||||
if (tokenErr) return rej('invalid token param');
|
||||
|
@ -44,7 +44,7 @@ import config from '../../../../../config';
|
||||
* @param {any} params
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
module.exports = (params: any) => new Promise(async (res, rej) => {
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
// Get 'appSecret' parameter
|
||||
const [appSecret, appSecretErr] = $.str.get(params.appSecret);
|
||||
if (appSecretErr) return rej('invalid appSecret param');
|
||||
|
@ -45,7 +45,7 @@ import { ILocalUser } from '../../../../../models/user';
|
||||
/**
|
||||
* Show a session
|
||||
*/
|
||||
module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||
// Get 'token' parameter
|
||||
const [token, tokenErr] = $.str.get(params.token);
|
||||
if (tokenErr) return rej('invalid token param');
|
||||
|
@ -49,7 +49,7 @@ import { pack } from '../../../../../models/user';
|
||||
* @param {any} params
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
module.exports = (params: any) => new Promise(async (res, rej) => {
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
// Get 'appSecret' parameter
|
||||
const [appSecret, appSecretErr] = $.str.get(params.appSecret);
|
||||
if (appSecretErr) return rej('invalid appSecret param');
|
||||
|
Reference in New Issue
Block a user