summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts/reposts.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:39:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:39:14 +0900
commit3d5cdb8d2d60932caf1d29b0581c7d6243e06e37 (patch)
tree9c29d1062b08378d4c4cafe5976793616d45bc01 /src/api/endpoints/posts/reposts.ts
parentwip (diff)
downloadsharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.gz
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.bz2
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.zip
wip
Diffstat (limited to 'src/api/endpoints/posts/reposts.ts')
-rw-r--r--src/api/endpoints/posts/reposts.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/endpoints/posts/reposts.ts b/src/api/endpoints/posts/reposts.ts
index 89ab0e3d55..c1645117f0 100644
--- a/src/api/endpoints/posts/reposts.ts
+++ b/src/api/endpoints/posts/reposts.ts
@@ -12,9 +12,9 @@ import Post, { pack } from '../../models/post';
* @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).$;
@@ -47,7 +47,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
_id: -1
};
const query = {
- repost_id: post._id
+ repostId: post._id
} as any;
if (sinceId) {
sort._id = 1;