//native
/**
* Get alert receiver
* Retrieve a specific alert receiver by its ID
*/
export async function main(auth: RT.Qovery, alertReceiverId: string) {
const url = new URL(`https://api.qovery.com/api/alert-receivers/${alertReceiverId}`)
const response = await fetch(url, {
method: 'GET',
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