tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
delete old docs and new ones
awarm.space
2 months ago
9c45883f
9cd907c7
+12
-2
1 changed file
expand all
collapse all
unified
split
app
lish
[did]
[publication]
dashboard
deletePost.ts
+12
-2
app/lish/[did]/[publication]/dashboard/deletePost.ts
···
39
39
}
40
40
41
41
await Promise.all([
42
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
45
-
}),
46
46
+
}).catch(() => {}),
47
47
+
agent.site.standard.document.delete({
48
48
+
repo: credentialSession.did,
49
49
+
rkey: uri.rkey,
50
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
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
89
-
}),
95
95
+
}).catch(() => {}),
96
96
+
agent.site.standard.document.delete({
97
97
+
repo: credentialSession.did,
98
98
+
rkey: uri.rkey,
99
99
+
}).catch(() => {}),
90
100
supabaseServerClient.from("documents").delete().eq("uri", document_uri),
91
101
]);
92
102
revalidatePath("/lish/[did]/[publication]/dashboard", "layout");