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

13 lines
272 B
Ruby

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