mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-09 07:45:32 -05:00
First draft of API to add items to a collection (#37222)
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
class REST::CollectionItemSerializer < ActiveModel::Serializer
|
||||
delegate :accepted?, to: :object
|
||||
|
||||
attributes :position, :state
|
||||
attributes :id, :position, :state
|
||||
|
||||
belongs_to :account, serializer: REST::AccountSerializer, if: :accepted?
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user