summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/posts/reactions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/posts/reactions.ts')
-rw-r--r--src/server/api/endpoints/posts/reactions.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/api/endpoints/posts/reactions.ts b/src/server/api/endpoints/posts/reactions.ts
index feb140ab41..f753ba7c29 100644
--- a/src/server/api/endpoints/posts/reactions.ts
+++ b/src/server/api/endpoints/posts/reactions.ts
@@ -13,9 +13,9 @@ import Reaction, { pack } from '../../models/post-reaction';
* @return {Promise<any>}
*/
module.exports = (params, user) => new Promise(async (res, rej) => {
- // Get 'post_id' parameter
- const [postId, postIdErr] = $(params.post_id).id().$;
- if (postIdErr) return rej('invalid post_id param');
+ // Get 'postId' parameter
+ const [postId, postIdErr] = $(params.postId).id().$;
+ if (postIdErr) return rej('invalid postId param');
// Get 'limit' parameter
const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$;
@@ -41,8 +41,8 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
// Issue query
const reactions = await Reaction
.find({
- post_id: post._id,
- deleted_at: { $exists: false }
+ postId: post._id,
+ deletedAt: { $exists: false }
}, {
limit: limit,
skip: offset,