From af2d793398343dbd171a093e521ec449aaa0579b Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Sat, 2 Sep 2017 13:10:10 -0500 Subject: Define a serializer for /api/v1/mutes/details --- app/serializers/rest/mute_serializer.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/serializers/rest/mute_serializer.rb (limited to 'app/serializers/rest') diff --git a/app/serializers/rest/mute_serializer.rb b/app/serializers/rest/mute_serializer.rb new file mode 100644 index 000000000..043a2f059 --- /dev/null +++ b/app/serializers/rest/mute_serializer.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class REST::MuteSerializer < ActiveModel::Serializer + include RoutingHelper + + attributes :id, :account, :target_account, :created_at, :hide_notifications + + def account + REST::AccountSerializer.new(object.account) + end + + def target_account + REST::AccountSerializer.new(object.target_account) + end +end \ No newline at end of file -- cgit