Welcome to mirror list, hosted at ThFree Co, Russian Federation.

lfs_file_lock_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7961c4e666b374492f8c13ae5d14aca2d7d0f760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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_s(:iso8601) }

  expose :owner do
    expose(:name) { |entity| entity.user&.name }
  end
end