gitlab-org--gitlab-foss/app/services/applications/create_service.rb

20 lines
453 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-10-24 06:38:06 +00:00
module Applications
class CreateService
attr_reader :current_user, :params
2017-10-24 06:38:06 +00:00
def initialize(current_user, params)
@current_user = current_user
@params = params.except(:ip_address)
2017-10-24 06:38:06 +00:00
end
# EE would override and use `request` arg
def execute(request)
Doorkeeper::Application.create(params)
2017-10-24 06:38:06 +00:00
end
end
end
Applications::CreateService.prepend_if_ee('EE::Applications::CreateService')