diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-17 11:11:22 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-17 11:11:22 +0900 |
| commit | 9f81288fccdbaf9184d49e61680747945b34f23d (patch) | |
| tree | dce25db34136ffd9c05852ed4c2c493c23c96c07 /src/api/endpoints/aggregation/posts | |
| parent | Fix bug (diff) | |
| download | sharkey-9f81288fccdbaf9184d49e61680747945b34f23d.tar.gz sharkey-9f81288fccdbaf9184d49e61680747945b34f23d.tar.bz2 sharkey-9f81288fccdbaf9184d49e61680747945b34f23d.zip | |
Fix bug
Diffstat (limited to 'src/api/endpoints/aggregation/posts')
| -rw-r--r-- | src/api/endpoints/aggregation/posts/like.js | 3 | ||||
| -rw-r--r-- | src/api/endpoints/aggregation/posts/likes.js | 3 | ||||
| -rw-r--r-- | src/api/endpoints/aggregation/posts/reply.js | 3 | ||||
| -rw-r--r-- | src/api/endpoints/aggregation/posts/repost.js | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/api/endpoints/aggregation/posts/like.js b/src/api/endpoints/aggregation/posts/like.js index b82c494ff1..b5aa0a21af 100644 --- a/src/api/endpoints/aggregation/posts/like.js +++ b/src/api/endpoints/aggregation/posts/like.js @@ -48,8 +48,7 @@ module.exports = (params) => _id: '$date', count: { $sum: 1 } }} - ]) - .toArray(); + ]); datas.forEach(data => { data.date = data._id; diff --git a/src/api/endpoints/aggregation/posts/likes.js b/src/api/endpoints/aggregation/posts/likes.js index 0317245159..2ea22516f5 100644 --- a/src/api/endpoints/aggregation/posts/likes.js +++ b/src/api/endpoints/aggregation/posts/likes.js @@ -45,8 +45,7 @@ module.exports = (params) => post_id: false }, { sort: { created_at: -1 } - }) - .toArray(); + }); const graph = []; diff --git a/src/api/endpoints/aggregation/posts/reply.js b/src/api/endpoints/aggregation/posts/reply.js index e578bc6d7d..d79ccafb1c 100644 --- a/src/api/endpoints/aggregation/posts/reply.js +++ b/src/api/endpoints/aggregation/posts/reply.js @@ -47,8 +47,7 @@ module.exports = (params) => _id: '$date', count: { $sum: 1 } }} - ]) - .toArray(); + ]); datas.forEach(data => { data.date = data._id; diff --git a/src/api/endpoints/aggregation/posts/repost.js b/src/api/endpoints/aggregation/posts/repost.js index 38d63442a8..3e4840510d 100644 --- a/src/api/endpoints/aggregation/posts/repost.js +++ b/src/api/endpoints/aggregation/posts/repost.js @@ -47,8 +47,7 @@ module.exports = (params) => _id: '$date', count: { $sum: 1 } }} - ]) - .toArray(); + ]); datas.forEach(data => { data.date = data._id; |