Files
gitlab-foss/app/serializers/lfs_file_lock_entity.rb
2023-07-10 09:07:14 +00:00

14 lines
320 B
Ruby

# frozen_string_literal: true
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_fs(:iso8601) }
expose :owner do
expose(:name) { |entity| entity.user&.username }
end
end