This commit is contained in:
KMY 2024-12-16 11:38:52 +09:00
parent 3784ad273c
commit ddd3581bd8
8 changed files with 20 additions and 15 deletions

View file

@ -5,7 +5,8 @@ class REST::StatusEditSerializer < ActiveModel::Serializer
has_one :account, serializer: REST::AccountSerializer
attributes :content, :spoiler_text, :markdown, :sensitive, :created_at
attributes :content, :spoiler_text, :sensitive, :created_at
attribute :markdown_opt, key: :markdown
has_many :ordered_media_attachments, key: :media_attachments, serializer: REST::MediaAttachmentSerializer
has_many :emojis, serializer: REST::CustomEmojiSlimSerializer
@ -19,4 +20,8 @@ class REST::StatusEditSerializer < ActiveModel::Serializer
def poll
{ options: object.poll_options.map { |title| { title: title } } }
end
def markdown_opt
object.markdown
end
end