From 9f81288fccdbaf9184d49e61680747945b34f23d Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Jan 2017 11:11:22 +0900 Subject: Fix bug --- src/api/endpoints/posts/likes.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/api/endpoints/posts/likes.js') diff --git a/src/api/endpoints/posts/likes.js b/src/api/endpoints/posts/likes.js index 4778189fc6..6d3ab866be 100644 --- a/src/api/endpoints/posts/likes.js +++ b/src/api/endpoints/posts/likes.js @@ -62,14 +62,13 @@ module.exports = (params, user) => .find({ post_id: post._id, deleted_at: { $exists: false } - }, {}, { + }, { limit: limit, skip: offset, sort: { _id: sort == 'asc' ? 1 : -1 } - }) - .toArray(); + }); // Serialize res(await Promise.all(likes.map(async like => -- cgit v1.3.1-freya