( endpoint: string, annotationId: string )
| 103 | * Delete an annotation from the server. |
| 104 | */ |
| 105 | export async function deleteAnnotation( |
| 106 | endpoint: string, |
| 107 | annotationId: string |
| 108 | ): Promise<void> { |
| 109 | const response = await fetch(`${endpoint}/annotations/${annotationId}`, { |
| 110 | method: "DELETE", |
| 111 | }); |
| 112 | |
| 113 | if (!response.ok) { |
| 114 | throw new Error(`Failed to delete annotation: ${response.status}`); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | export type ActionResponse = { |
| 119 | success: boolean; |
no outgoing calls
no test coverage detected
searching dependent graphs…