Booking webhooks

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));
}

Hi,

Try removing the dollar sign from your collection name and see if that solves the issue.
In addition you can use console.log to debug your hooks.
See more here.

Did you find a way to make it work? :slight_smile: