2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-04 01:15:08 +08:00
discourse/app/models/admin_dashboard_data.rb
Ted Johansson 0adb2e18ad
DEV: Remove old problem check system - part 2 (#34403)
We have overhauled the problem check system, which is now database backed. As part of that we marked some existing code as deprecated and slated for removal. This PR removes it.
2025-08-20 16:15:21 +08:00

32 lines
498 B
Ruby

# frozen_string_literal: true
class AdminDashboardData
include StatsCacheable
# kept for backward compatibility
GLOBAL_REPORTS = []
def initialize(opts = {})
@opts = opts
end
def get_json
{}
end
def as_json(_options = nil)
@json ||= get_json
end
def self.fetch_stats
new.as_json
end
def self.reports(source)
source.map { |type| Report.find(type).as_json }
end
def self.stats_cache_key
"dashboard-data-#{Report::SCHEMA_VERSION}"
end
end