fix(rtc): add :db/ident in :update-page op

This commit is contained in:
rcmerci
2025-08-14 16:25:07 +08:00
parent be340b5ee4
commit 597cded1ba
2 changed files with 6 additions and 4 deletions

View File

@@ -193,12 +193,13 @@
(defmethod local-block-ops->remote-ops-aux :update-page-op
[_ & {:keys [db block-uuid *remote-ops]}]
(when-let [{page-name :block/name title :block/title}
(when-let [{page-name :block/name title :block/title db-ident :db/ident}
(d/entity db [:block/uuid block-uuid])]
(swap! *remote-ops conj
[:update-page {:block-uuid block-uuid
:page-name page-name
:block/title (or title page-name)}])))
[:update-page (cond-> {:block-uuid block-uuid
:page-name page-name
:block/title (or title page-name)}
db-ident (assoc :db/ident db-ident))])))
(defmethod local-block-ops->remote-ops-aux :remove-op
[_ & {:keys [db remove-op *remote-ops]}]

View File

@@ -43,6 +43,7 @@
[:cat :keyword
[:map
[:block-uuid :uuid]
[:db/ident {:optional true} :keyword]
[:page-name :string]
[:block/title :string]]]]
[:remove-page