discourse/app/controllers/admin/dashboard_controller.rb
2013-03-18 10:08:08 -04:00

13 lines
No EOL
376 B
Ruby

class Admin::DashboardController < Admin::AdminController
def index
render_json_dump({
reports: ['visits', 'signups', 'topics', 'posts', 'flags', 'users_by_trust_level', 'likes'].map { |type| Report.find(type) },
total_users: User.count
}.merge(
SiteSetting.version_checks? ? {version_check: DiscourseUpdates.check_version} : {}
))
end
end