mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Show prompt for required tag groups (#16458)
This commit is contained in:
@@ -246,9 +246,10 @@ class TagsController < ::ApplicationController
|
||||
filter_params[:order_popularity] = true
|
||||
end
|
||||
|
||||
tags_with_counts = DiscourseTagging.filter_allowed_tags(
|
||||
tags_with_counts, filter_result_context = DiscourseTagging.filter_allowed_tags(
|
||||
guardian,
|
||||
filter_params
|
||||
**filter_params,
|
||||
with_context: true
|
||||
)
|
||||
|
||||
tags = self.class.tag_counts_json(tags_with_counts, show_pm_tags: guardian.can_tag_pms?)
|
||||
@@ -281,6 +282,10 @@ class TagsController < ::ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
if required_tag_group = filter_result_context[:required_tag_group]
|
||||
json_response[:required_tag_group] = required_tag_group
|
||||
end
|
||||
|
||||
render json: json_response
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user