diff --git a/config/variables.go b/config/variables.go index 39c40e8..537597a 100644 --- a/config/variables.go +++ b/config/variables.go @@ -107,7 +107,7 @@ type ControllerMethodConfig struct { // WebhookEndpointConfig holds a single incoming webhook endpoint. Endpoints are // keyed by name under webhook.endpoints; the name is the last path segment of // the endpoint's URL, so an endpoint named "example" is served at -// POST /api/webhook/example. One endpoint per external application and target +// POST /api/webhook/post/example. One endpoint per external application and target // channel group keeps their tokens and recipients apart. type WebhookEndpointConfig struct { // Enabled controls whether the endpoint accepts requests. A disabled diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue index 8c27886..5487035 100644 --- a/frontend/src/views/Settings.vue +++ b/frontend/src/views/Settings.vue @@ -32,7 +32,7 @@ const sections = [ { key: 'showTriggerCmdEcho', type: 'bool', label: 'Trigger command echo' }, { key: 'showKomariTaskEcho', type: 'bool', label: 'Komari task echo' }, { key: 'showFlapTolerantEcho', type: 'bool', label: 'Flap inhibition echo' }, - { key: 'onebotIgnoreSelfMsg', type: 'bool', label: 'Ignore OneBot self messages' } + { key: 'oneBotIgnoreSelfMsg', type: 'bool', label: 'Ignore OneBot self messages' } ] }, { diff --git a/handler/webhook.go b/handler/webhook.go index 2a101de..d749ed9 100644 --- a/handler/webhook.go +++ b/handler/webhook.go @@ -24,12 +24,12 @@ type webhookRequest struct { Content string `json:"content"` } -// WebhookHandler handles POST /api/webhook/{name}, the incoming webhook API +// WebhookHandler handles POST /api/webhook/post/{name}, the incoming webhook API // served on its own listener (see webhook in config.json). The path segment // selects the endpoint, which carries the token to present and the notification // channels to deliver to: // -// POST /api/webhook/example +// POST /api/webhook/post/example // {"token": "...", "subject": "...", "content": "..."} // // The alert is rendered per channel and sent through every channel the endpoint diff --git a/router.go b/router.go index 5ccb805..cca6ca6 100644 --- a/router.go +++ b/router.go @@ -61,7 +61,7 @@ func SetupRouter() *http.ServeMux { // SetupRouter it is served on its own listener (webhook.listenAddr/listenPort), // so external applications can be given access to the webhook port without // reaching the admin API. Every endpoint configured under webhook.endpoints is -// reachable as /api/webhook/. +// reachable as /api/webhook/post/{name}. func SetupWebhookRouter() *http.ServeMux { postLog.Info("Setting up webhook routers...")