diff --git a/app/serializers/rest/application_serializer.rb b/app/serializers/rest/application_serializer.rb index a8945f66..a9316cd4 100644 --- a/app/serializers/rest/application_serializer.rb +++ b/app/serializers/rest/application_serializer.rb @@ -15,4 +15,8 @@ class REST::ApplicationSerializer < ActiveModel::Serializer def client_secret object.secret end + + def website + object.website.presence + end end diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb index e6e9c8e8..51011788 100644 --- a/app/serializers/rest/media_attachment_serializer.rb +++ b/app/serializers/rest/media_attachment_serializer.rb @@ -19,6 +19,10 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer end end + def remote_url + object.remote_url.presence + end + def preview_url if object.needs_redownload? media_proxy_url(object.id, :small)