diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-18 22:04:03 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-18 22:04:03 -0600 |
commit | 5c9fbacaafa0734d1c56762b671d39ba0391bc0b (patch) | |
tree | d4427fee31b360d29e702102f14a4a1cfd3a6986 /app/serializers/rest | |
parent | 8f4f29f7101fd599f166b54a7c06faf782894748 (diff) |
Add support for updating posts in-place to the frontend and API. This makes it possible to implement features such as *real* post editing.
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/account_serializer.rb | 6 | ||||
-rw-r--r-- | app/serializers/rest/status_serializer.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index 509b688db..3e826aaf3 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -4,9 +4,9 @@ class REST::AccountSerializer < ActiveModel::Serializer include RoutingHelper attributes :id, :username, :acct, :display_name, :locked, :bot, :created_at, - :note, :url, :avatar, :avatar_static, :header, :header_static, - :followers_count, :following_count, :statuses_count, :replies, - :adult_content, :gently, :kobold, :role, :froze, :identity, + :updated_at, :note, :url, :avatar, :avatar_static, :header, + :header_static, :followers_count, :following_count, :statuses_count, + :replies, :adult_content, :gently, :kobold, :role, :froze, :identity, :limited, :signature has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested? diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 86c63e772..75a1dc591 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -3,9 +3,9 @@ class REST::StatusSerializer < ActiveModel::Serializer include Redisable - attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id, - :sensitive, :spoiler_text, :visibility, :language, - :uri, :url, :replies_count, :reblogs_count, + attributes :id, :created_at, :updated_at, :in_reply_to_id, + :in_reply_to_account_id, :sensitive, :spoiler_text, :visibility, + :language, :uri, :url, :replies_count, :reblogs_count, :favourites_count, :network, :curated, :reject_replies attribute :favourited, if: :current_user? |