summaryrefslogtreecommitdiff
path: root/app/services/gpg_keys
diff options
context:
space:
mode:
authorhaseeb <haseebeqx@gmail.com>2017-09-15 15:35:24 +0000
committerRémy Coutable <remy@rymai.me>2017-09-15 15:35:24 +0000
commitcc2daa74d83c98dc05dd92f0950a122b46b83c96 (patch)
tree15fd2a4af5cb199f989c838d3e88f0c906d9d322 /app/services/gpg_keys
parentff7eb46ddb2fc54baa7024334640f3fe99e43f9d (diff)
downloadgitlab-ce-cc2daa74d83c98dc05dd92f0950a122b46b83c96.tar.gz
created services for keys
Diffstat (limited to 'app/services/gpg_keys')
-rw-r--r--app/services/gpg_keys/create_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/gpg_keys/create_service.rb b/app/services/gpg_keys/create_service.rb
new file mode 100644
index 00000000000..e822a89c4d3
--- /dev/null
+++ b/app/services/gpg_keys/create_service.rb
@@ -0,0 +1,9 @@
+module GpgKeys
+ class CreateService < Keys::BaseService
+ def execute
+ key = user.gpg_keys.create(params)
+ notification_service.new_gpg_key(key) if key.persisted?
+ key
+ end
+ end
+end