//native
type Render = {
apiKey: string
}
/**
* Delete registry credential
* Delete the registry credential with the provided ID.
*/
export async function main(auth: Render, registryCredentialId: string) {
const url = new URL(`https://api.render.com/v1/registrycredentials/${registryCredentialId}`)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Bearer ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 235 days ago