Files
speckle-server/packages/frontend-2/lib/core/composables/zapier.ts
T

19 lines
374 B
TypeScript

export function useZapier() {
const sendWebhook = async (webhookUrl: string, data: Record<string, string>) => {
const response = await fetch(webhookUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
mode: 'no-cors',
body: JSON.stringify(data)
})
return response
}
return {
sendWebhook
}
}