@layouts.dash.app({ title: 'WEBHOOK' })
async function sendMessage(data) {
const url = "{{ `${request.protocol()}://${request.host()}/api/message` }}";
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});
console.log(await response.json());
}
sendMessage({
token: 'TOKEN',
to: 'RECIPIENT NUMBER',
message: "Hai",
})