summaryrefslogtreecommitdiff
path: root/src/api/endpoints/channels/posts.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/channels/posts.ts
parentwip (diff)
downloadsharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.gz
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.bz2
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.zip
wip
Diffstat (limited to 'src/api/endpoints/channels/posts.ts')
-rw-r--r--src/api/endpoints/channels/posts.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/endpoints/channels/posts.ts b/src/api/endpoints/channels/posts.ts
index d722589c20..7536664051 100644
--- a/src/api/endpoints/channels/posts.ts
+++ b/src/api/endpoints/channels/posts.ts
@@ -30,9 +30,9 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
return rej('cannot set since_id and until_id');
}
- // Get 'channel_id' parameter
- const [channelId, channelIdErr] = $(params.channel_id).id().$;
- if (channelIdErr) return rej('invalid channel_id param');
+ // Get 'channelId' parameter
+ const [channelId, channelIdErr] = $(params.channelId).id().$;
+ if (channelIdErr) return rej('invalid channelId param');
// Fetch channel
const channel: IChannel = await Channel.findOne({
@@ -49,7 +49,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
};
const query = {
- channel_id: channel._id
+ channelId: channel._id
} as any;
if (sinceId) {