mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 18:02:46 +08:00
82d6420e31
What is the problem? Before this change, we were relying on the `/tags` endpoint which returned all the tags that are visible to a give user on the site leading to potential performance problems. The attribute keys of the response also changes based on the `tags_listed_by_group` site setting. What is the fix? This commit fixes the problems listed above by creating a dedicate `#list` action in the `TagsController` to handle the listing of the tags in the edit navigation menu tags modal. This is because the `TagsController#index` action was created specifically for the `/tags` route and the response body does not really map well to what we need. The `TagsController#list` action added here is also much safer since the response is paginated and we avoid loading a whole bunch of tags upfront. |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |