2023-02-15 16:02:49 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-01-05 15:06:54 +01:00
|
|
|
json.totals @totals
|
|
|
|
json.notifications(@notifications) do |notification|
|
|
|
|
json.extract! notification, :id, :notification_type_id, :notification_type, :created_at, :is_read
|
|
|
|
json.attached_object notification.attached_object
|
|
|
|
json.message do
|
|
|
|
if notification.notification_type.nil?
|
|
|
|
json.partial! 'api/notifications/undefined_notification', notification: notification
|
|
|
|
else
|
|
|
|
json.partial! "/api/notifications/#{notification.notification_type}", notification: notification
|
2015-05-05 03:10:25 +02:00
|
|
|
end
|
|
|
|
end
|
2023-02-15 16:02:49 +01:00
|
|
|
end
|