1
0

notification_policy_serializer.rb 445 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. class REST::NotificationPolicySerializer < ActiveModel::Serializer
  3. attributes :filter_not_following,
  4. :filter_not_followers,
  5. :filter_new_accounts,
  6. :filter_private_mentions,
  7. :summary
  8. def summary
  9. {
  10. pending_requests_count: object.pending_requests_count.to_i,
  11. pending_notifications_count: object.pending_notifications_count.to_i,
  12. }
  13. end
  14. end