Use UpdateRunnerService to update runner in API:
TODO: Add tests to make sure controllers and API would tick the queue.
This commit is contained in:
parent
80bc66596a
commit
c1a37c6032
1 changed files with 2 additions and 1 deletions
|
@ -60,8 +60,9 @@ module API
|
|||
put ':id' do
|
||||
runner = get_runner(params.delete(:id))
|
||||
authenticate_update_runner!(runner)
|
||||
update_service = Ci::UpdateRunnerService.new(runner)
|
||||
|
||||
if runner.update(declared_params(include_missing: false))
|
||||
if update_service.update(declared_params(include_missing: false))
|
||||
present runner, with: Entities::RunnerDetails, current_user: current_user
|
||||
else
|
||||
render_validation_error!(runner)
|
||||
|
|
Loading…
Reference in a new issue