cartodb-4.42/app/controllers/carto/api/received_notification_presenter.rb
2024-04-06 05:25:13 +00:00

18 lines
454 B
Ruby

class Carto::Api::ReceivedNotificationPresenter
include Carto::HtmlSafe
def initialize(received_notification)
@received_notification = received_notification
end
def to_hash
{
id: @received_notification.id,
icon: @received_notification.icon,
html_body: markdown_html_safe(@received_notification.body),
received_at: @received_notification.received_at,
read_at: @received_notification.read_at
}
end
end