summaryrefslogtreecommitdiff
path: root/app/services/applications/create_service.rb
blob: 3d88c4f064edad10dab4579e49b302ae1527131c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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