gitlab-org--gitlab-foss/app/services/keys/create_service.rb
2017-09-15 15:35:24 +00:00

9 lines
195 B
Ruby

module Keys
class CreateService < ::Keys::BaseService
def execute
key = user.keys.create(params)
notification_service.new_key(key) if key.persisted?
key
end
end
end