travis-api/lib/travis/api/v3/services/job/cancel.rb
Renée Hendricksen b94d9c8637 use the new method
2016-07-07 00:31:35 -04:00

13 lines
268 B
Ruby

module Travis::API::V3
class Services::Job::Cancel < Service
def run
job = check_login_and_find(:job)
access_control.permissions(job).cancel!
query.cancel(access_control.user)
accepted(job: job, state_change: :cancel)
end
end
end