diff options
| author | haseeb <haseebeqx@gmail.com> | 2017-09-15 15:35:24 +0000 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2017-09-15 15:35:24 +0000 |
| commit | cc2daa74d83c98dc05dd92f0950a122b46b83c96 (patch) | |
| tree | 15fd2a4af5cb199f989c838d3e88f0c906d9d322 /app/controllers/admin | |
| parent | ff7eb46ddb2fc54baa7024334640f3fe99e43f9d (diff) | |
| download | gitlab-ce-cc2daa74d83c98dc05dd92f0950a122b46b83c96.tar.gz | |
created services for keys
Diffstat (limited to 'app/controllers/admin')
| -rw-r--r-- | app/controllers/admin/deploy_keys_controller.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/admin/deploy_keys_controller.rb b/app/controllers/admin/deploy_keys_controller.rb index e5cba774dcb..a7ab481519d 100644 --- a/app/controllers/admin/deploy_keys_controller.rb +++ b/app/controllers/admin/deploy_keys_controller.rb @@ -10,9 +10,8 @@ class Admin::DeployKeysController < Admin::ApplicationController end def create - @deploy_key = deploy_keys.new(create_params.merge(user: current_user)) - - if @deploy_key.save + @deploy_key = DeployKeys::CreateService.new(current_user, create_params.merge(public: true)).execute + if @deploy_key.persisted? redirect_to admin_deploy_keys_path else render 'new' |
