Browse Source

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

closed-social-v3
Eugen Rochko 7 years ago
committed by GitHub
parent
commit
9ea4f37e78
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      app/views/api/v1/media/create.rabl
  2. +1
    -1
      app/views/api/v1/statuses/_media.rabl

+ 4
- 2
app/views/api/v1/media/create.rabl 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 }

+ 1
- 1
app/views/api/v1/statuses/_media.rabl 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 }

Loading…
Cancel
Save