Add API for on-demand generation of annual reports (#37055)

This commit is contained in:
Claire
2025-12-02 14:37:05 +01:00
committed by GitHub
parent 9aec6936e5
commit f8422e1fa4
7 changed files with 236 additions and 5 deletions

View File

@@ -18,6 +18,13 @@ class AnnualReport
'annual_report_'
end
def self.current_campaign
return unless Mastodon::Feature.wrapstodon_enabled?
datetime = Time.now.utc
datetime.year if datetime.month == 12 && (10..31).cover?(datetime.day)
end
def initialize(account, year)
@account = account
@year = year