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 Post from '../../../models/post';
* @param {any} params
* @return {Promise<any>}
*/
module.exports = (params) =>
new Promise(async (res, rej) =>
{
module.exports = (params) => new Promise(async (res, rej) => {
// Get 'user_id' parameter
const [userId, userIdErr] = it(params.user_id).expect.id().required().qed();
if (userIdErr) return rej('invalid user_id param');
@ -95,7 +91,7 @@ module.exports = (params) =>
)[0];
if (data) {
graph.push(data)
graph.push(data);
} else {
graph.push({
date: {
@ -106,8 +102,8 @@ module.exports = (params) =>
posts: 0,
reposts: 0,
replies: 0
})
};
});
}
}
res(graph);