fix: unpublish not working for a local graph

This commit is contained in:
Gabriel Horner
2026-01-21 12:26:24 -05:00
parent a24a7d48fe
commit 7ca5c1de64
2 changed files with 7 additions and 2 deletions

View File

@@ -338,6 +338,7 @@
[:logseq.kv/db-type
:logseq.kv/schema-version
:logseq.kv/graph-uuid
:logseq.kv/local-graph-uuid
:logseq.kv/graph-rtc-e2ee?
:logseq.kv/latest-code-lang
:logseq.kv/graph-backup-folder

View File

@@ -409,8 +409,12 @@
[page]
(let [token (state/get-auth-id-token)
headers (cond-> {}
token (assoc "authorization" (str "Bearer " token)))]
(p/let [graph-uuid (some-> (ldb/get-graph-rtc-uuid (db/get-db)) str)
token (assoc "authorization" (str "Bearer " token)))
db (db/get-db (state/get-current-repo))]
(p/let [graph-uuid (some->
(or (ldb/get-graph-rtc-uuid db)
(ldb/get-graph-local-uuid db))
str)
page-uuid (some-> (:block/uuid page) str)]
(if (and graph-uuid page-uuid)
(-> (p/let [resp (js/fetch (publish-page-endpoint graph-uuid page-uuid)