blob: e0f309875de2a09d9e9067d83578b0082d6ec3f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
module Projects
class DisableDeployKeyService < BaseService
def execute
# rubocop: disable CodeReuse/ActiveRecord
deploy_key_project = project.deploy_keys_projects.find_by(deploy_key_id: params[:id])
# rubocop: enable CodeReuse/ActiveRecord
deploy_key_project&.destroy!
end
end
end
Projects::DisableDeployKeyService.prepend_mod_with('Projects::DisableDeployKeyService')
|