Fix #5119: /counts/posts ignores aliased tags on betabooru

This commit is contained in:
evazion
2022-04-18 00:52:08 -05:00
parent 6c5dd5ffed
commit 089adc085b

View File

@@ -6,7 +6,7 @@ class CountsController < ApplicationController
def posts
estimate_count = params.fetch(:estimate_count, "true").truthy?
skip_cache = params.fetch(:skip_cache, "false").truthy?
@count = PostQuery.new(params[:tags], current_user: CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
@count = PostQuery.normalize(params[:tags], current_user: CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
if request.format.xml?
respond_with({ posts: @count }, root: "counts")