wip
This commit is contained in:
parent
a766faeae9
commit
80e5645a84
150 changed files with 305 additions and 2334 deletions
|
|
@ -1,17 +1,11 @@
|
|||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import $ from 'cafy';
|
||||
import User from '../../../../models/user';
|
||||
import { validateUsername } from '../../../../models/user';
|
||||
|
||||
/**
|
||||
* Check available username
|
||||
*
|
||||
* @param {any} params
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
module.exports = async (params) => new Promise(async (res, rej) => {
|
||||
module.exports = async (params: any) => new Promise(async (res, rej) => {
|
||||
// Get 'username' parameter
|
||||
const [username, usernameError] = $.str.pipe(validateUsername).get(params.username);
|
||||
if (usernameError) return rej('invalid username param');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue