From 04a0a1d4ba6542222b0efe5f503feff0c5bed411 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 26 May 2017 18:22:30 +0200 Subject: [PATCH] Add "meta" attribute to return of POST /api/v1/media method as well (#3333) --- app/views/api/v1/media/create.rabl | 6 ++++-- app/views/api/v1/statuses/_media.rabl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/api/v1/media/create.rabl b/app/views/api/v1/media/create.rabl index 916217cbde..53c13bbda1 100644 --- a/app/views/api/v1/media/create.rabl +++ b/app/views/api/v1/media/create.rabl @@ -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 } diff --git a/app/views/api/v1/statuses/_media.rabl b/app/views/api/v1/statuses/_media.rabl index bcba78c95b..07ac31888d 100644 --- a/app/views/api/v1/statuses/_media.rabl +++ b/app/views/api/v1/statuses/_media.rabl @@ -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 } \ No newline at end of file +node(:meta) { |media| media.file.meta }