summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/posts.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
commitbfc193d8cd9aecdb82d585e8b4e101deac60a5bb (patch)
tree8b4dac3a56cf703650c8207f9279028a8560a96b /src/server/api/endpoints/posts.ts
parentresolve conflict (diff)
downloadsharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.gz
sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.bz2
sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.zip
Resolve conflicts
Diffstat (limited to 'src/server/api/endpoints/posts.ts')
-rw-r--r--src/server/api/endpoints/posts.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/server/api/endpoints/posts.ts b/src/server/api/endpoints/posts.ts
index 7df744d2a3..bee1de02d4 100644
--- a/src/server/api/endpoints/posts.ts
+++ b/src/server/api/endpoints/posts.ts
@@ -35,17 +35,17 @@ module.exports = (params) => new Promise(async (res, rej) => {
const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$;
if (limitErr) return rej('invalid limit param');
- // Get 'since_id' parameter
- const [sinceId, sinceIdErr] = $(params.since_id).optional.id().$;
- if (sinceIdErr) return rej('invalid since_id param');
+ // Get 'sinceId' parameter
+ const [sinceId, sinceIdErr] = $(params.sinceId).optional.id().$;
+ if (sinceIdErr) return rej('invalid sinceId param');
- // Get 'until_id' parameter
- const [untilId, untilIdErr] = $(params.until_id).optional.id().$;
- if (untilIdErr) return rej('invalid until_id param');
+ // Get 'untilId' parameter
+ const [untilId, untilIdErr] = $(params.untilId).optional.id().$;
+ if (untilIdErr) return rej('invalid untilId param');
- // Check if both of since_id and until_id is specified
+ // Check if both of sinceId and untilId is specified
if (sinceId && untilId) {
- return rej('cannot set since_id and until_id');
+ return rej('cannot set sinceId and untilId');
}
// Construct query
@@ -65,15 +65,15 @@ module.exports = (params) => new Promise(async (res, rej) => {
}
if (reply != undefined) {
- query.reply_id = reply ? { $exists: true, $ne: null } : null;
+ query.replyId = reply ? { $exists: true, $ne: null } : null;
}
if (repost != undefined) {
- query.repost_id = repost ? { $exists: true, $ne: null } : null;
+ query.repostId = repost ? { $exists: true, $ne: null } : null;
}
if (media != undefined) {
- query.media_ids = media ? { $exists: true, $ne: null } : null;
+ query.mediaIds = media ? { $exists: true, $ne: null } : null;
}
if (poll != undefined) {
@@ -82,7 +82,7 @@ module.exports = (params) => new Promise(async (res, rej) => {
// TODO
//if (bot != undefined) {
- // query.is_bot = bot;
+ // query.isBot = bot;
//}
// Issue query