discord: fix tag search commands being limited to 2 tags.
This commit is contained in:
@@ -102,7 +102,7 @@ class ApplicationController < ActionController::Base
|
||||
render_error_page(406, exception, message: "#{request.format} is not a supported format for this page")
|
||||
when PaginationExtension::PaginationError
|
||||
render_error_page(410, exception, template: "static/pagination_error", message: "You cannot go beyond page #{CurrentUser.user.page_limit}.")
|
||||
when Post::SearchError
|
||||
when PostQueryBuilder::TagLimitError
|
||||
render_error_page(422, exception, template: "static/tag_limit_error", message: "You cannot search for more than #{CurrentUser.tag_query_limit} tags at a time.")
|
||||
when RateLimiter::RateLimitError
|
||||
render_error_page(429, exception)
|
||||
|
||||
@@ -4,7 +4,7 @@ class CountsController < ApplicationController
|
||||
def posts
|
||||
estimate_count = params.fetch(:estimate_count, "true").truthy?
|
||||
skip_cache = params.fetch(:skip_cache, "false").truthy?
|
||||
@count = PostQueryBuilder.new(params[:tags], CurrentUser.user).normalized_query.fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
|
||||
@count = PostQueryBuilder.new(params[:tags], CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).normalized_query.fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
|
||||
|
||||
if request.format.xml?
|
||||
respond_with({ posts: @count }, root: "counts")
|
||||
|
||||
Reference in New Issue
Block a user