gearheads
/
mastodon
Archived
2
0
Fork 0

Add "meta" attribute to return of POST /api/v1/media method as well (#3333)

gh/stable
Eugen Rochko 2017-05-26 18:22:30 +02:00 committed by GitHub
parent c48772fd3f
commit 9ea4f37e78
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
object @media
attribute :id, :type
node(:url) { |media| full_asset_url(media.file.url(:original)) }
node(:url) { |media| full_asset_url(media.file.url(:original)) }
node(:preview_url) { |media| full_asset_url(media.file.url(:small)) }
node(:text_url) { |media| medium_url(media) }
node(:text_url) { |media| medium_url(media) }
node(:meta) { |media| media.file.meta }

View File

@ -3,4 +3,4 @@ attributes :id, :remote_url, :type
node(:url) { |media| full_asset_url(media.file.url(:original)) }
node(:preview_url) { |media| full_asset_url(media.file.url(:small)) }
node(:text_url) { |media| media.local? ? medium_url(media) : nil }
node(:meta) { |media| media.file.meta }
node(:meta) { |media| media.file.meta }