Change /api/v1/announcements
to return regular Status
entities (#26736)
This commit is contained in:
parent
9ae2594726
commit
fc89ecc6ca
2 changed files with 8 additions and 18 deletions
|
@ -59,11 +59,13 @@ class Announcement < ApplicationRecord
|
|||
end
|
||||
|
||||
def statuses
|
||||
@statuses ||= if status_ids.nil?
|
||||
[]
|
||||
else
|
||||
Status.where(id: status_ids).distributable_visibility
|
||||
end
|
||||
@statuses ||= begin
|
||||
if status_ids.nil?
|
||||
[]
|
||||
else
|
||||
Status.with_includes.distributable_visibility.where(id: status_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def tags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue