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

locks_finder_service.rb « lfs « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d52cf0e3cc4ce6bec10fec1e362eb08e7815f7ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Lfs
  class LocksFinderService < BaseService
    def execute
      success(locks: find_locks)
    rescue => ex
      error(ex.message, 500)
    end

    private

    def find_locks
      options = params.slice(:id, :path).compact.symbolize_keys

      project.lfs_file_locks.where(options)
    end
  end
end