gitlab-org--gitlab-foss/app/services/applications/create_service.rb
Rémy Coutable eafe834c3d
Reduce remaining diff with EE in app/services
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-02-14 12:37:55 +01:00

17 lines
417 B
Ruby

# frozen_string_literal: true
module Applications
class CreateService
attr_reader :current_user, :params
def initialize(current_user, params)
@current_user = current_user
@params = params.except(:ip_address) # rubocop: disable CodeReuse/ActiveRecord
end
# EE would override and use `request` arg
def execute(request)
Doorkeeper::Application.create(params)
end
end
end