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

20 lines
418 B
Ruby

module Carto
module Api
class SnapshotPresenter
def initialize(snapshot)
@snapshot = snapshot
end
def to_hash
{
id: @snapshot.id,
created_at: @snapshot.created_at,
updated_at: @snapshot.updated_at,
state: @snapshot.state,
user: Carto::Api::UserPresenter.new(@snapshot.user).to_public_poro
}
end
end
end
end