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

22 lines
461 B
Ruby

require 'json'
module Carto
module Api
class DbdirectCertificatePresenter
def initialize(dbdirect_certificate)
@dbdirect_certificate = dbdirect_certificate
end
def to_poro
return {} unless @dbdirect_certificate
{
id: @dbdirect_certificate.id,
name: @dbdirect_certificate.name,
expiration: @dbdirect_certificate.expiration.to_datetime.rfc3339
}
end
end
end
end