debian-mirror-gitlab/app/services/applications/create_service.rb
2018-12-13 13:39:08 +05:30

17 lines
427 B
Ruby

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