fix(twilio/receive-sms): use phonenumber sid in removing webhook
This commit is contained in:
@@ -60,13 +60,13 @@ export default defineTrigger({
|
|||||||
},
|
},
|
||||||
|
|
||||||
async unregisterHook($) {
|
async unregisterHook($) {
|
||||||
const toNumber = $.step.parameters.toNumber as string;
|
const phoneNumberSid = $.step.parameters.phoneNumberSid as string;
|
||||||
const payload = new URLSearchParams({
|
const payload = new URLSearchParams({
|
||||||
SmsUrl: '',
|
SmsUrl: '',
|
||||||
}).toString();
|
}).toString();
|
||||||
|
|
||||||
await $.http.post(
|
await $.http.post(
|
||||||
`/2010-04-01/Accounts/${$.auth.data.accountSid}/IncomingPhoneNumbers/PN${toNumber}.json`,
|
`/2010-04-01/Accounts/${$.auth.data.accountSid}/IncomingPhoneNumbers/${phoneNumberSid}.json`,
|
||||||
payload
|
payload
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user