2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
module Applications
|
|
|
|
class CreateService
|
2019-05-18 00:54:41 +05:30
|
|
|
attr_reader :current_user, :params
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
def initialize(current_user, params)
|
|
|
|
@current_user = current_user
|
2019-05-18 00:54:41 +05:30
|
|
|
@params = params.except(:ip_address) # rubocop: disable CodeReuse/ActiveRecord
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
# EE would override and use `request` arg
|
2018-11-08 19:23:39 +05:30
|
|
|
def execute(request)
|
2019-05-18 00:54:41 +05:30
|
|
|
Doorkeeper::Application.create(params)
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|