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

18 lines
417 B
Ruby
Raw Normal View History

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