debian-mirror-gitlab/app/services/keys/create_service.rb

10 lines
195 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
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