debian-mirror-gitlab/app/graphql/mutations/ci/pipeline_schedule/delete.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
522 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# frozen_string_literal: true
module Mutations
module Ci
module PipelineSchedule
class Delete < Base
graphql_name 'PipelineScheduleDelete'
authorize :admin_pipeline_schedule
def resolve(id:)
schedule = authorized_find!(id: id)
if schedule.destroy
{
errors: []
}
else
{
errors: ['Failed to remove the pipeline schedule']
}
end
end
end
end
end
end