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