1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-27 04:58:37 +09:00
mastodon/app/serializers/rest/notification_policy_serializer.rb

17 lines
445 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class REST::NotificationPolicySerializer < ActiveModel::Serializer
attributes :filter_not_following,
:filter_not_followers,
:filter_new_accounts,
:filter_private_mentions,
:summary
def summary
{
pending_requests_count: object.pending_requests_count.to_i,
pending_notifications_count: object.pending_notifications_count.to_i,
}
end
end