type Acumbamail = {
authToken: string
}
export async function main(resource: Acumbamail, list_id: number) {
const endpoint = 'https://acumbamail.com/api/1/deleteList/'
const formData = new FormData()
formData.append('auth_token', resource.authToken)
formData.append('list_id', list_id.toString())
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 41 days ago