popular searches: fix blank search counts on /explore/posts/searches.
This commit is contained in:
@@ -28,7 +28,7 @@ module Explore
|
|||||||
|
|
||||||
def searches
|
def searches
|
||||||
@date, @scale, @min_date, @max_date = parse_date(params)
|
@date, @scale, @min_date, @max_date = parse_date(params)
|
||||||
@searches = ReportbooruService.new.popular_searches(@date)
|
@searches = ReportbooruService.new.post_search_rankings(@date)
|
||||||
end
|
end
|
||||||
|
|
||||||
def missed_searches
|
def missed_searches
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class ReportbooruService
|
|||||||
|
|
||||||
def popular_searches(date, limit: 100)
|
def popular_searches(date, limit: 100)
|
||||||
ranking = post_search_rankings(date)
|
ranking = post_search_rankings(date)
|
||||||
|
ranking = post_search_rankings(date.yesterday) if ranking.blank?
|
||||||
ranking.take(limit).map(&:first)
|
ranking.take(limit).map(&:first)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user