({
webhooks,
}: {
webhooks: WebhookJSONDefinition;
})
| 287 | return ServerResponse(generalError.status, generalError.toJSON()); |
| 288 | } |
| 289 | async handleWebhooksJSONPush({ |
| 290 | webhooks, |
| 291 | }: { |
| 292 | webhooks: WebhookJSONDefinition; |
| 293 | }) { |
| 294 | if (!hasAdminAccess(this.token)) return NotAdminResponse(); |
| 295 | try { |
| 296 | // TODO: add back webhooks |
| 297 | // this.server.webhooksManager.addAndStoreWebhooks(webhooks); |
| 298 | return ServerResponse(200, {}); |
| 299 | } catch (e) { |
| 300 | return this.errorResponse(e, { |
| 301 | fallbackMessage: 'Could not add webhooks.', |
| 302 | }); |
| 303 | } |
| 304 | } |
| 305 | async handleWebhooksClear() { |
| 306 | if (!hasAdminAccess(this.token)) return NotAdminResponse(); |
| 307 | try { |
no test coverage detected