type Acumbamail = {
authToken: string
}
export async function main(resource: Acumbamail, list_id: number, subscriber_email: string) {
const endpoint = `https://acumbamail.com/api/1/deleteSubscriber/`
const formData = new FormData()
formData.append('auth_token', resource.authToken)
formData.append('list_id', list_id.toString())
formData.append('email', subscriber_email)
const response = await fetch(endpoint, {
method: 'POST',
headers: {
'Cache-Control': 'no-cache'
},
body: formData
})
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)
}
return { success: true }
}
Submitted by hugo697 54 days ago