mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 12:58:30 +08:00
16 lines
483 B
Ruby
16 lines
483 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseZendeskPlugin
|
|
class Engine < ::Rails::Engine
|
|
engine_name PLUGIN_NAME
|
|
isolate_namespace DiscourseZendeskPlugin
|
|
|
|
config.after_initialize do
|
|
Discourse::Application.routes.append do
|
|
post "/zendesk-plugin/issues" => "discourse_zendesk_plugin/issues#create",
|
|
:constraints => StaffConstraint.new
|
|
put "/zendesk-plugin/sync" => "discourse_zendesk_plugin/sync#webhook"
|
|
end
|
|
end
|
|
end
|
|
end
|