type Mailgun = {
api_key: string;
};
export async function main(
resource: Mailgun,
data: {
listAddress: string;
memberAddress: string;
}
) {
return (
await fetch(
`https://api.mailgun.net/v3/lists/${data.listAddress}/members/${data.memberAddress}`,
{
method: "DELETE",
headers: {
Authorization:
"Basic " +
Buffer.from(`api:${resource.api_key}`).toString("base64"),
},
}
)
).json();
}
Submitted by hugo697 229 days ago