summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/posts/trend.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/trend.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/trend.ts')
-rw-r--r--src/server/api/endpoints/posts/trend.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/api/endpoints/posts/trend.ts b/src/server/api/endpoints/posts/trend.ts
index caded92bf5..bc0c47fbc6 100644
--- a/src/server/api/endpoints/posts/trend.ts
+++ b/src/server/api/endpoints/posts/trend.ts
@@ -38,24 +38,24 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
if (pollErr) return rej('invalid poll param');
const query = {
- created_at: {
+ createdAt: {
$gte: new Date(Date.now() - ms('1days'))
},
- repost_count: {
+ repostCount: {
$gt: 0
}
} as any;
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) {
@@ -68,7 +68,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
limit: limit,
skip: offset,
sort: {
- repost_count: -1,
+ repostCount: -1,
_id: -1
}
});