debian-mirror-gitlab/app/graphql/mutations/ci/pipeline_schedule/delete.rb
2022-11-25 23:54:43 +05:30

27 lines
522 B
Ruby

# 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