debian-mirror-gitlab/app/services/applications/create_service.rb
2018-12-05 23:21:45 +05:30

16 lines
381 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
def execute(request)
Doorkeeper::Application.create(@params)
end
end
end