Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-02-17 16:03:12 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-02-17 16:03:12 +0300
commitf662bc5a866dc24580caa48952f25061bae60d1a (patch)
tree1cd3c637b0581056aa9ce608e08b974e870a4607 /lib/api
parent5cc9ebbe14ce35de1ec45fc7abce3aa9f408ddf2 (diff)
parent60288d6c62d7e65ed5a93a72ba047ccaa2daa22b (diff)
Merge branch 'use-update-runner-service' into 'master'
Prefer service object over after_save hook Closes #26921 See merge request !8664
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/runners.rb3
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)