summaryrefslogtreecommitdiff
path: root/src/api/endpoints/aggregation/posts/reply.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-04 04:28:38 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-04 04:28:38 +0900
commit3c1b92baa1ac15c23fe63e2f50739105252ca516 (patch)
tree35a0ae58802891f05209c83e780440775075e088 /src/api/endpoints/aggregation/posts/reply.ts
parentMerge pull request #233 from syuilo/greenkeeper/inquirer-3.0.6 (diff)
downloadsharkey-3c1b92baa1ac15c23fe63e2f50739105252ca516.tar.gz
sharkey-3c1b92baa1ac15c23fe63e2f50739105252ca516.tar.bz2
sharkey-3c1b92baa1ac15c23fe63e2f50739105252ca516.zip
Follow linter
Diffstat (limited to 'src/api/endpoints/aggregation/posts/reply.ts')
-rw-r--r--src/api/endpoints/aggregation/posts/reply.ts12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/api/endpoints/aggregation/posts/reply.ts b/src/api/endpoints/aggregation/posts/reply.ts
index 1f936bbc2f..541bc594d4 100644
--- a/src/api/endpoints/aggregation/posts/reply.ts
+++ b/src/api/endpoints/aggregation/posts/reply.ts
@@ -1,5 +1,3 @@
-'use strict';
-
/**
* Module dependencies
*/
@@ -12,9 +10,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 'post_id' parameter
const [postId, postIdErr] = it(params.post_id).expect.id().required().qed();
if (postIdErr) return rej('invalid post_id param');
@@ -62,7 +58,7 @@ module.exports = (params) =>
)[0];
if (data) {
- graph.push(data)
+ graph.push(data);
} else {
graph.push({
date: {
@@ -71,8 +67,8 @@ module.exports = (params) =>
day: day.getDate()
},
count: 0
- })
- };
+ });
+ }
}
res(graph);