diff --git a/packages/make-app-taskade/test/validate.mjs b/packages/make-app-taskade/test/validate.mjs index e153ec0..f137bdb 100644 --- a/packages/make-app-taskade/test/validate.mjs +++ b/packages/make-app-taskade/test/validate.mjs @@ -229,6 +229,10 @@ for (const id of Object.keys(components.webhook)) { } }); } + // Make sends `Content-Type: application/json` on a detach, and Taskade answers 400 to a + // JSON request with an empty body, so the webhook stays. Send `{}`. + const detach = code[`webhook.${id}.detach`]; + if (detach?.method === 'DELETE' && detach.body == null) fail(`webhook.${id}.detach: a DELETE needs "body": {}`); } // "Deploy to Make" creates a module or RPC with its local ID as the name, and refuses // an ID with a dash (Make Apps Editor 2.9.0, validate-id.js). diff --git a/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc b/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc b/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc b/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc b/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc b/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc b/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" },