Add endpoint deletion
The endpoints screen could only create and edit servers, so a mistyped or retired endpoint stayed in the list forever. Tasks reference endpoints without ON DELETE CASCADE, so a referenced endpoint is refused with 409 and a count of the tasks using it rather than cascading away migration history. The foreign-key violation is mapped to the same status to cover a task created between check and delete. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,8 @@ export const updateEndpoint = (
|
||||
body: { role_label: string; host: string; port: number; tls_mode: TLSMode },
|
||||
) => api(`/api/endpoints/${id}`, { ...jsonBody(body), method: 'PUT' })
|
||||
|
||||
export const deleteEndpoint = (id: number) => api(`/api/endpoints/${id}`, { method: 'DELETE' })
|
||||
|
||||
export const deleteTask = (id: number) => api(`/api/tasks/${id}`, { method: 'DELETE' })
|
||||
|
||||
export const deleteAccount = (taskId: number, accountId: number) =>
|
||||
|
||||
Reference in New Issue
Block a user