diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-06 13:55:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-06 13:55:51 +0200 |
commit | e445a8af64908b2bdb721bec74c113e8258a129b (patch) | |
tree | 028c911a65731dba93ebf048a9750811a2a95091 /app/serializers | |
parent | cf643d0060590948f8fb97ab9bd2045f3649b056 (diff) |
Add timeline read markers API (#11762)
Fix #4093
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/rest/marker_serializer.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/serializers/rest/marker_serializer.rb b/app/serializers/rest/marker_serializer.rb new file mode 100644 index 000000000..2eaf3d507 --- /dev/null +++ b/app/serializers/rest/marker_serializer.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class REST::MarkerSerializer < ActiveModel::Serializer + attributes :last_read_id, :version, :updated_at + + def last_read_id + object.last_read_id.to_s + end + + def version + object.lock_version + end +end |