summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/ci/runners_registration_token/reset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/ci/runners_registration_token/reset.rb')
-rw-r--r--app/graphql/mutations/ci/runners_registration_token/reset.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/graphql/mutations/ci/runners_registration_token/reset.rb b/app/graphql/mutations/ci/runners_registration_token/reset.rb
index 8c49b682ab0..c9fe7ea47f0 100644
--- a/app/graphql/mutations/ci/runners_registration_token/reset.rb
+++ b/app/graphql/mutations/ci/runners_registration_token/reset.rb
@@ -49,7 +49,10 @@ module Mutations
end
def reset_token(scope)
- ::Ci::Runners::ResetRegistrationTokenService.new(scope, current_user).execute if scope
+ return unless scope
+
+ result = ::Ci::Runners::ResetRegistrationTokenService.new(scope, current_user).execute
+ result.payload[:new_registration_token] if result.success?
end
end
end