add webhook endpoint on report change (#21)
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m16s

This commit is contained in:
2023-12-21 15:49:39 +01:00
parent 2a9869ca7d
commit ca16ce0603
3 changed files with 24 additions and 1 deletions

11
src/lib/server/webhook.ts Normal file
View File

@@ -0,0 +1,11 @@
async function webhookUserReported(endpoint: string, uuid: string) {
await fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
user: uuid
})
});
}