//native
/**
* Delete Goal Comment
* Delete a goal comment.
*/
export async function main(
auth: RT.BambooHr,
employeeId: string,
goalId: string,
commentId: string
) {
const url = new URL(
`https://${auth.companyDomain}.bamboohr.com/api/v1/performance/employees/${employeeId}/goals/${goalId}/comments/${commentId}`
)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Basic ' + btoa(`${auth.apiKey}:x`)
},
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