debian-mirror-gitlab/app/graphql/mutations/alert_management/http_integration/destroy.rb

25 lines
631 B
Ruby
Raw Normal View History

2021-01-29 00:20:46 +05:30
# frozen_string_literal: true
module Mutations
module AlertManagement
module HttpIntegration
class Destroy < HttpIntegrationBase
graphql_name 'HttpIntegrationDestroy'
argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration],
required: true,
2021-02-22 17:27:13 +05:30
description: "The ID of the integration to remove"
2021-01-29 00:20:46 +05:30
def resolve(id:)
integration = authorized_find!(id: id)
response ::AlertManagement::HttpIntegrations::DestroyService.new(
integration,
current_user
).execute
end
end
end
end
end