mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 08:33:37 +08:00
be99c3eec7
Update `release_notes_link` to current version <!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
17 lines
546 B
Ruby
17 lines
546 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AdminDashboardGeneralData < AdminDashboardData
|
|
def get_json
|
|
days_since_update = Discourse.last_commit_date ? ((DateTime.now - Discourse.last_commit_date) / 1.day).to_i : nil
|
|
{
|
|
updated_at: Time.zone.now.as_json,
|
|
discourse_updated_at: Discourse.last_commit_date,
|
|
release_notes_link: "https://meta.discourse.org/c/announcements/67?tags=release-notes&before=#{days_since_update}"
|
|
}
|
|
end
|
|
|
|
def self.stats_cache_key
|
|
"general-dashboard-data-#{Report::SCHEMA_VERSION}"
|
|
end
|
|
end
|