Welcome to mirror list, hosted at ThFree Co, Russian Federation.

create_service.rb « applications « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dff0d9696f8ca8634ee1ad604c34a669085563c4 (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
    attr_reader :current_user, :params

    def initialize(current_user, params)
      @current_user = current_user
      @params = params.except(:ip_address) # rubocop: disable CodeReuse/ActiveRecord
    end

    # EE would override and use `request` arg
    def execute(request)
      Doorkeeper::Application.create(params)
    end
  end
end