debian-mirror-gitlab/app/services/keys/create_service.rb
2019-12-04 20:38:33 +05:30

13 lines
288 B
Ruby

# frozen_string_literal: true
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
Keys::CreateService.prepend_if_ee('EE::Keys::CreateService')