feat: delete task/account, edit endpoint, richer event log
- store: DeleteAccount, DeleteTask, UpdateEndpoint (+ cascade/update tests)
- httpapi: DELETE /tasks/{id}, DELETE /tasks/{id}/accounts/{accountId},
PUT /endpoints/{id}; delete guarded with 409 while task running
- orchestrator: enrich WS events with login/host/port/error (test + run + errors)
- web: delete buttons (task, account) with confirm, endpoint edit form,
human-readable event log (source/dest, host:port, error text)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMHQTtnQtQqL8muAXHr9kd
This commit is contained in:
@@ -32,6 +32,12 @@ func (s *Store) GetTask(ctx context.Context, id int64) (Task, error) {
|
||||
return t, err
|
||||
}
|
||||
|
||||
// DeleteTask removes a task and its accounts/runs/migrated_messages via ON DELETE CASCADE.
|
||||
func (s *Store) DeleteTask(ctx context.Context, id int64) error {
|
||||
_, err := s.Pool.Exec(ctx, `DELETE FROM tasks WHERE id=$1`, id)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *Store) ListTasks(ctx context.Context) ([]Task, error) {
|
||||
rows, err := s.Pool.Query(ctx,
|
||||
`SELECT id, name, src_endpoint_id, dst_endpoint_id, status, folder_mapping
|
||||
|
||||
Reference in New Issue
Block a user