diff options
Diffstat (limited to 'src/api/endpoints/posts/replies.ts')
| -rw-r--r-- | src/api/endpoints/posts/replies.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/endpoints/posts/replies.ts b/src/api/endpoints/posts/replies.ts index 9279cd66f6..4516dce15c 100644 --- a/src/api/endpoints/posts/replies.ts +++ b/src/api/endpoints/posts/replies.ts @@ -14,11 +14,11 @@ import serialize from '../../serializers/post'; */ module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'post_id' parameter - const [postId, postIdErr] = it(params.post_id, 'id', true); + const [postId, postIdErr] = it(params.post_id, 'id!').get(); if (postIdErr) return rej('invalid post_id param'); // Get 'limit' parameter - const [limit = 10, limitErr] = it(params.limit).expect.number().range(1, 100)).get(); + const [limit = 10, limitErr] = it(params.limit).expect.number().range(1, 100).get(); if (limitErr) return rej('invalid limit param'); // Get 'offset' parameter |