summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts/trend.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/posts/trend.ts
parentwip (diff)
downloadsharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.gz
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.bz2
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.zip
wip
Diffstat (limited to 'src/api/endpoints/posts/trend.ts')
-rw-r--r--src/api/endpoints/posts/trend.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/endpoints/posts/trend.ts b/src/api/endpoints/posts/trend.ts
index caded92bf5..3f92f06167 100644
--- a/src/api/endpoints/posts/trend.ts
+++ b/src/api/endpoints/posts/trend.ts
@@ -38,7 +38,7 @@ 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: {
@@ -47,15 +47,15 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
} 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) {