cartodb-4.42/app/controllers/helpers/organization_notifications_helper.rb

8 lines
320 B
Ruby
Raw Permalink Normal View History

2024-04-06 13:25:13 +08:00
module OrganizationNotificationsHelper
def load_organization_notifications
carto_user = Carto::User.where(id: current_user.id).first if current_user
@organization_notifications = carto_user ? carto_user.received_notifications.unread.map { |n| Carto::Api::ReceivedNotificationPresenter.new(n) } : {}
end
end