summaryrefslogtreecommitdiff
path: root/src/api/endpoints
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-25 23:39:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-25 23:39:22 +0900
commite6e63f0679199e0fee84311539b46ad8972f9ed2 (patch)
tree838ca99142ddbd35168d638ec99b264333d1b2fe /src/api/endpoints
parent[API] Fix bug (diff)
downloadsharkey-e6e63f0679199e0fee84311539b46ad8972f9ed2.tar.gz
sharkey-e6e63f0679199e0fee84311539b46ad8972f9ed2.tar.bz2
sharkey-e6e63f0679199e0fee84311539b46ad8972f9ed2.zip
[API] Improve trend algorithm
Diffstat (limited to 'src/api/endpoints')
-rw-r--r--src/api/endpoints/posts/trend.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/endpoints/posts/trend.ts b/src/api/endpoints/posts/trend.ts
index 8a373636ad..3277206d26 100644
--- a/src/api/endpoints/posts/trend.ts
+++ b/src/api/endpoints/posts/trend.ts
@@ -41,6 +41,9 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
const query = {
created_at: {
$gte: new Date(Date.now() - ms('1days'))
+ },
+ repost_count: {
+ $gt: 0
}
} as any;