Class: ChatNames::AuthorizeUserService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Routing
Defined in:
app/services/chat_names/authorize_user_service.rb

Instance Method Summary collapse

Methods included from Gitlab::Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

#initialize(service, params) ⇒ AuthorizeUserService

Returns a new instance of AuthorizeUserService.


7
8
9
10
# File 'app/services/chat_names/authorize_user_service.rb', line 7

def initialize(service, params)
  @service = service
  @params = params
end

Instance Method Details

#executeObject


12
13
14
15
16
17
18
# File 'app/services/chat_names/authorize_user_service.rb', line 12

def execute
  return unless chat_name_params.values.all?(&:present?)

  token = request_token

  new_profile_chat_name_url(token: token) if token
end