mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add API for on-demand generation of annual reports (#37055)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user