BigW Consortium Gitlab

Use single presenter for everything

parent 37057870
......@@ -33,10 +33,10 @@ class ChatSlashCommandsService < Service
user = find_chat_user(params)
unless user
url = authorize_chat_name_url(params)
return presenter.authorize_chat_name(url)
return Gitlab::ChatCommands::Presenter.authorize_chat_name(url)
end
Gitlab::ChatCommands::Command.new(presenter, project, user, params).execute
Gitlab::ChatCommands::Command.new(project, user, params).execute
end
private
......@@ -48,8 +48,4 @@ class ChatSlashCommandsService < Service
def authorize_chat_name_url(params)
ChatNames::AuthorizeUserService.new(self, params).execute
end
def presenter
throw NotImplementedError
end
end
......@@ -18,8 +18,4 @@ class MattermostSlashCommandsService < ChatService
def to_param
'mattermost_slash_commands'
end
def presenter
Gitlab::ChatCommands::Presenters::Mattermost.new
end
end
......@@ -12,8 +12,4 @@ class SlackSlashCommandsService < ChatSlashCommandsService
def to_param
'slack_slash_commands'
end
def presenter
Gitlab::ChatCommands::Presenters::Mattermost.new
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment