From 60a7640eb1547dc61997ba5db1eb2c28bdec33a0 Mon Sep 17 00:00:00 2001 From: こぴなたみぽ Date: Wed, 1 Nov 2017 10:22:40 +0900 Subject: RENAME: reply_to -> reply --- src/api/endpoints/users/get_frequently_replied_users.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/endpoints/users/get_frequently_replied_users.ts') diff --git a/src/api/endpoints/users/get_frequently_replied_users.ts b/src/api/endpoints/users/get_frequently_replied_users.ts index 2e0e2e40a7..bb0f3b4cea 100644 --- a/src/api/endpoints/users/get_frequently_replied_users.ts +++ b/src/api/endpoints/users/get_frequently_replied_users.ts @@ -27,7 +27,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { // Fetch recent posts const recentPosts = await Post.find({ user_id: user._id, - reply_to_id: { + reply_id: { $exists: true, $ne: null } @@ -38,7 +38,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { limit: 1000, fields: { _id: false, - reply_to_id: true + reply_id: true } }); @@ -49,7 +49,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { const replyTargetPosts = await Post.find({ _id: { - $in: recentPosts.map(p => p.reply_to_id) + $in: recentPosts.map(p => p.reply_id) }, user_id: { $ne: user._id -- cgit v1.2.3-freya