//native
type Motimate = {
token: string
}
export async function main(auth: Motimate, report_template_id: string) {
const url = new URL(
`https://motimateapp.com/public_api/insights/learnings/report_templates/${report_template_id}`
)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Bearer ' + auth.token
}
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 581 days ago