2018-11-17 00:59:17 -05:00
|
|
|
# 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
|
2019-09-13 09:26:31 -04:00
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
Projects::DisableDeployKeyService.prepend_mod_with('Projects::DisableDeployKeyService')
|