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
revert to old doc write flow
awarm.space
5 days ago
a54ab8c6
b53f1d98
+12
-2
1 changed file
expand all
collapse all
unified
split
app
api
inngest
functions
sync_document_metadata.ts
+12
-2
app/api/inngest/functions/sync_document_metadata.ts
···
39
39
});
40
40
if (!handleResult) return { error: "No Handle" };
41
41
42
42
+
if (handleResult.isBridgy) {
43
43
+
await step.run("delete-bridgy-doc", async () => {
44
44
+
return await supabaseServerClient
45
45
+
.from("documents")
46
46
+
.delete()
47
47
+
.eq("uri", document_uri);
48
48
+
});
49
49
+
return { handle: handleResult.handle, deleted: true };
50
50
+
}
51
51
+
42
52
await step.run("set-indexed", async () => {
43
53
return await supabaseServerClient
44
54
.from("documents")
45
45
-
.update({ indexed: !handleResult.isBridgy })
55
55
+
.update({ indexed: true })
46
56
.eq("uri", document_uri)
47
57
.select();
48
58
});
49
59
50
50
-
if (!bsky_post_uri || handleResult.isBridgy) {
60
60
+
if (!bsky_post_uri) {
51
61
return { handle: handleResult.handle };
52
62
}
53
63