Follow linter

This commit is contained in:
syuilo 2017-03-04 04:28:38 +09:00
parent 4e3d617797
commit 3c1b92baa1
70 changed files with 514 additions and 780 deletions

View file

@ -1,5 +1,3 @@
'use strict';
/**
* Module dependencies
*/
@ -13,9 +11,7 @@ import { validateUsername } from '../../models/user';
* @param {any} params
* @return {Promise<any>}
*/
module.exports = async (params) =>
new Promise(async (res, rej) =>
{
module.exports = async (params) => new Promise(async (res, rej) => {
// Get 'username' parameter
const [username, usernameError] = it(params.username).expect.string().required().trim().validate(validateUsername).qed();
if (usernameError) return rej('invalid username param');