add webhook endpoint on report change (#21)
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m16s
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m16s
This commit is contained in:
11
src/lib/server/webhook.ts
Normal file
11
src/lib/server/webhook.ts
Normal 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
|
||||
})
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user