a tool for shared writing and social publishing

delete old docs and new ones

+12 -2
+12 -2
app/lish/[did]/[publication]/dashboard/deletePost.ts
··· 39 39 } 40 40 41 41 await Promise.all([ 42 + // Delete from both PDS collections (document exists in one or the other) 42 43 agent.pub.leaflet.document.delete({ 43 44 repo: credentialSession.did, 44 45 rkey: uri.rkey, 45 - }), 46 + }).catch(() => {}), 47 + agent.site.standard.document.delete({ 48 + repo: credentialSession.did, 49 + rkey: uri.rkey, 50 + }).catch(() => {}), 46 51 supabaseServerClient.from("documents").delete().eq("uri", document_uri), 47 52 supabaseServerClient 48 53 .from("leaflets_in_publications") ··· 83 88 } 84 89 85 90 await Promise.all([ 91 + // Delete from both PDS collections (document exists in one or the other) 86 92 agent.pub.leaflet.document.delete({ 87 93 repo: credentialSession.did, 88 94 rkey: uri.rkey, 89 - }), 95 + }).catch(() => {}), 96 + agent.site.standard.document.delete({ 97 + repo: credentialSession.did, 98 + rkey: uri.rkey, 99 + }).catch(() => {}), 90 100 supabaseServerClient.from("documents").delete().eq("uri", document_uri), 91 101 ]); 92 102 revalidatePath("/lish/[did]/[publication]/dashboard", "layout");