mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-12 23:38:20 +00:00
Add account_id attribute to AnnualReport entity (#37182)
This commit is contained in:
@@ -33,7 +33,7 @@ class GeneratedAnnualReport < ApplicationRecord
|
||||
when 1
|
||||
data['most_reblogged_accounts'].pluck('account_id') + data['commonly_interacted_with_accounts'].pluck('account_id')
|
||||
when 2
|
||||
[]
|
||||
[account_id]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
class REST::AnnualReportSerializer < ActiveModel::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
attributes :year, :data, :schema_version, :share_url
|
||||
attributes :year, :data, :schema_version, :share_url, :account_id
|
||||
|
||||
def share_url
|
||||
public_wrapstodon_url(object.account, object.year, object.share_key) if object.share_key.present?
|
||||
end
|
||||
|
||||
def account_id
|
||||
object.account_id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user