mirror of
https://github.com/discourse/discourse-chat-integration.git
synced 2025-02-21 11:07:19 +00:00
Provider controllers are automatically disabled when the provider is disabled (works the same way as plugin controllers)
24 lines
514 B
Ruby
24 lines
514 B
Ruby
module DiscourseChat::Provider::SlackProvider
|
|
class SlackCommandController < DiscourseChat::Provider::HookController
|
|
requires_provider ::DiscourseChat::Provider::SlackProvider::PROVIDER_NAME
|
|
|
|
def say_hello
|
|
|
|
render json: {hello: "world"}
|
|
end
|
|
end
|
|
|
|
class SlackEngine < ::Rails::Engine
|
|
engine_name DiscourseChat::PLUGIN_NAME+"-slack"
|
|
isolate_namespace DiscourseChat::Provider::SlackProvider
|
|
end
|
|
|
|
SlackEngine.routes.draw do
|
|
get "command" => "slack_command#say_hello"
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|