diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-08 17:29:44 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-08 17:29:44 +0300 |
commit | c1a37c6032c3a53a79027c25c33660ad018359e4 (patch) | |
tree | 9c35d02d86f3845c3c7591adde732cd2298b3607 /lib/api/runners.rb | |
parent | 80bc66596adee89b423d4da8cafcddf3b98c9678 (diff) |
Use UpdateRunnerService to update runner in API:
TODO: Add tests to make sure controllers and API
would tick the queue.
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r-- | lib/api/runners.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 4816b5ed1b7..4fbd4096533 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -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) |