dawarich/app/services/users/export_data/notifications.rb

18 lines
278 B
Ruby
Raw Normal View History

2025-06-25 16:23:43 -04:00
# frozen_string_literal: true
class Users::ExportData::Notifications
def initialize(user)
@user = user
end
def call
2025-06-30 16:51:25 -04:00
# Export all notifications for the user
2025-06-30 14:29:47 -04:00
user.notifications
.as_json(except: %w[user_id id])
2025-06-25 16:23:43 -04:00
end
private
attr_reader :user
end