discourse/app/controllers/admin/plugins_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
442 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Admin::PluginsController < Admin::StaffController
def index
render_serialized(
Discourse.plugins_sorted_by_name(enabled_only: false),
AdminPluginSerializer,
root: "plugins",
)
end
private
def preload_additional_json
store_preloaded(
"enabledPluginAdminRoutes",
MultiJson.dump(Discourse.plugins_sorted_by_name.filter_map(&:admin_route)),
)
end
end