2019-05-12 22:37:49 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-12-29 07:31:05 -05:00
|
|
|
require_dependency "admin_constraint"
|
2017-07-13 08:32:11 -04:00
|
|
|
|
2021-07-13 15:36:16 -04:00
|
|
|
module ::DiscourseChatIntegration
|
2017-07-13 08:32:11 -04:00
|
|
|
AdminEngine.routes.draw do
|
|
|
|
get "" => "chat#respond"
|
2022-12-29 07:31:05 -05:00
|
|
|
get "/providers" => "chat#list_providers"
|
|
|
|
post "/test" => "chat#test"
|
2017-08-01 15:53:39 -04:00
|
|
|
|
2022-12-29 07:31:05 -05:00
|
|
|
get "/channels" => "chat#list_channels"
|
|
|
|
post "/channels" => "chat#create_channel"
|
|
|
|
put "/channels/:id" => "chat#update_channel"
|
|
|
|
delete "/channels/:id" => "chat#destroy_channel"
|
2017-07-18 11:17:03 -04:00
|
|
|
|
2022-12-29 07:31:05 -05:00
|
|
|
post "/rules" => "chat#create_rule"
|
|
|
|
put "/rules/:id" => "chat#update_rule"
|
|
|
|
delete "/rules/:id" => "chat#destroy_rule"
|
2017-07-13 08:32:11 -04:00
|
|
|
|
|
|
|
get "/:provider" => "chat#respond"
|
|
|
|
end
|
2017-07-24 11:13:53 -04:00
|
|
|
|
2022-12-29 07:31:05 -05:00
|
|
|
PublicEngine.routes.draw { get "/:secret" => "public#post_transcript" }
|
2017-08-01 15:53:39 -04:00
|
|
|
end
|