Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

locks_finder_service.rb 315 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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