diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-03-28 17:05:36 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-28 17:05:36 +0900 |
| commit | 46e530ef41bb640cfa66438e888d1ecd6f90f6bb (patch) | |
| tree | a23eefae5e437ad6adc7dfe190daba81138aa70b /src/api/endpoints/posts/replies.ts | |
| parent | #1294 (diff) | |
| parent | oops (diff) | |
| download | sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.tar.gz sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.tar.bz2 sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.zip | |
Merge pull request #1324 from syuilo/#1288-2
snake_case を camelCase にするなどした
Diffstat (limited to 'src/api/endpoints/posts/replies.ts')
| -rw-r--r-- | src/api/endpoints/posts/replies.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/endpoints/posts/replies.ts b/src/api/endpoints/posts/replies.ts index 613c4fa24c..db021505fc 100644 --- a/src/api/endpoints/posts/replies.ts +++ b/src/api/endpoints/posts/replies.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).$; @@ -39,7 +39,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { // Issue query const replies = await Post - .find({ reply_id: post._id }, { + .find({ replyId: post._id }, { limit: limit, skip: offset, sort: { |