debian-mirror-gitlab/app/services/lfs/locks_finder_service.rb
2018-03-17 18:26:18 +05:30

17 lines
315 B
Ruby

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