gitlab-org--gitlab-foss/app/services/lfs/locks_finder_service.rb

20 lines
346 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-02-07 13:00:53 +00:00
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