about summary refs log tree commit diff
path: root/app/views/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/api')
-rw-r--r--app/views/api/oembed/show.json.rabl2
-rw-r--r--app/views/api/v1/instances/show.rabl2
-rw-r--r--app/views/api/v1/statuses/_media.rabl4
3 files changed, 4 insertions, 4 deletions
diff --git a/app/views/api/oembed/show.json.rabl b/app/views/api/oembed/show.json.rabl
index 311c02dad..11dcec538 100644
--- a/app/views/api/oembed/show.json.rabl
+++ b/app/views/api/oembed/show.json.rabl
@@ -6,7 +6,7 @@ node(:version) { '1.0' }
 node(:title, &:title)
 node(:author_name) { |entry| entry.account.display_name.blank? ? entry.account.username : entry.account.display_name }
 node(:author_url) { |entry| account_url(entry.account) }
-node(:provider_name) { Rails.configuration.x.local_domain }
+node(:provider_name) { site_hostname }
 node(:provider_url) { root_url }
 node(:cache_age) { 86_400 }
 node(:html) { |entry| "<iframe src=\"#{embed_account_stream_entry_url(entry.account, entry)}\" style=\"width: 100%; overflow: hidden\" frameborder=\"0\" width=\"#{@width}\" height=\"#{@height}\" scrolling=\"no\"></iframe>" }
diff --git a/app/views/api/v1/instances/show.rabl b/app/views/api/v1/instances/show.rabl
index 88eb08a9e..f5598fde3 100644
--- a/app/views/api/v1/instances/show.rabl
+++ b/app/views/api/v1/instances/show.rabl
@@ -1,6 +1,6 @@
 object false
 
-node(:uri)         { Rails.configuration.x.local_domain }
+node(:uri)         { site_hostname }
 node(:title)       { Setting.site_title }
 node(:description) { Setting.site_description }
 node(:email)       { Setting.site_contact_email }
diff --git a/app/views/api/v1/statuses/_media.rabl b/app/views/api/v1/statuses/_media.rabl
index 80d80ea05..2f56c6d07 100644
--- a/app/views/api/v1/statuses/_media.rabl
+++ b/app/views/api/v1/statuses/_media.rabl
@@ -1,5 +1,5 @@
 attributes :id, :remote_url, :type
 
-node(:url)         { |media| media.file.blank? ? media.remote_url : full_asset_url(media.file.url(:original)) }
-node(:preview_url) { |media| media.file.blank? ? media.remote_url : full_asset_url(media.file.url(:small)) }
+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 }