debian-mirror-gitlab/app/serializers/lfs_file_lock_entity.rb
2018-03-17 18:26:18 +05:30

11 lines
284 B
Ruby

class LfsFileLockEntity < Grape::Entity
root 'locks', 'lock'
expose :path
expose(:id) { |entity| entity.id.to_s }
expose(:created_at, as: :locked_at) { |entity| entity.created_at.to_s(:iso8601) }
expose :owner do
expose(:name) { |entity| entity.user&.name }
end
end