diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-14 00:04:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 00:04:30 +0200 |
commit | 9239e4ce4d4e958e62552d4a01183d0295c020f5 (patch) | |
tree | 8f33707c027e2c10b62c0c6fffe1eb3bf27d38ef /app/serializers | |
parent | 06f26e09b4bff120181eaaeb70a833482368ea63 (diff) |
Uploads for admin site settings (#4913)
* Improve OpenGraph tags for about pages * Add thumbnail admin setting * Fix error * Fix up
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/rest/instance_serializer.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index a97137909..2898011fd 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -1,8 +1,10 @@ # frozen_string_literal: true class REST::InstanceSerializer < ActiveModel::Serializer + include RoutingHelper + attributes :uri, :title, :description, :email, - :version, :urls, :stats + :version, :urls, :stats, :thumbnail def uri Rails.configuration.x.local_domain @@ -24,6 +26,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer Mastodon::Version.to_s end + def thumbnail + full_asset_url(instance_presenter.thumbnail.file.url) if instance_presenter.thumbnail + end + def stats { user_count: instance_presenter.user_count, |