//native
/**
* Delete a screen
* Deletes a screen
*/
export async function main(auth: RT.Mezmo, id: string) {
const url = new URL(`https://api.mezmo.com/v1/config/screen/${id}`)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Token ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago