I am trying to run these simple Booking webhooks and nothing is showing up on hookb.io. I have no idea how to debug this.
Any suggestions?
import {fetch} from ‘wix-fetch’;
export function Bookings$Schedule_afterInsert(item, context) {
//TODO: write your code here…
fetch(“hookb.in - hookb Resources and Information.”, {method: “get”})
.then( (httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
}
else
{
return Promise.reject(“Fetch did not succeed”);
}
})
.then(json => console.log(json))
. catch (err => console.log(err));
}
export function Bookings$Schedule_afterUpdate(item, context) {
//TODO: write your code here…
fetch(“hookb.in”, {method: “get”})
.then( (httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
}
else
{
return Promise.reject(“Fetch did not succeed”);
}
})
.then(json => console.log(json))
. catch (err => console.log(err));
}