fix(core): soft-delete source connections with deleted_at

Migration 0003 adds source_connections.deleted_at. deleteConnection sets it; listing, lookups,
updates, the scheduler and the sync handler ignore deleted connections, so a paused
credential-less connection stays visible and can be resumed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 21:25:59 +01:00
co-authored by Claude Opus 5.5
parent 0a540208e1
commit e3a759d768
8 changed files with 81 additions and 16 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import {
devicePoll,
deviceStart,
getConnection,
isDeletedConnection,
listConnections,
listRuns,
updateConnection,
@@ -48,7 +47,7 @@ export const sourceRoutes = [
path: "sources",
summary: "Your source connections (never includes secrets).",
auth: "any:read",
handler: async ({ deps, user }) => (await listConnections(deps.db, user.id)).filter((c) => !isDeletedConnection(c)),
handler: async ({ deps, user }) => listConnections(deps.db, user.id),
}),
route({
method: "POST",