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