//native
type Clerk = {
apiKey: string;
};
/**
* Delete a Svix app
* Delete a Svix app and disassociate it from the current instance
*/
export async function main(auth: Clerk) {
const url = new URL(`https://api.clerk.com/v1/webhooks/svix`);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: "Bearer " + auth.apiKey,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 428 days ago