Trends: support author threshold (default: 3)

This commit is contained in:
Alex Gleason
2023-07-25 18:04:00 -05:00
parent 969bc1fcba
commit 33f87822d4
3 changed files with 24 additions and 10 deletions

View File

@@ -13,7 +13,11 @@ const trendingTagsController: AppController = (c) => {
const now = new Date();
const yesterday = new Date(now.getTime() - Time.days(1));
const tags = trends.getTrendingTags(yesterday, now, limit);
const tags = trends.getTrendingTags({
since: yesterday,
until: now,
limit,
});
return c.json(tags.map(({ name, accounts, uses }) => ({
name,