mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 03:16:37 +00:00
fix: redirect to alias
This commit is contained in:
@@ -469,6 +469,11 @@
|
||||
(when-let [conn (worker-state/get-datascript-conn repo)]
|
||||
(ldb/get-block-refs-count @conn id)))
|
||||
|
||||
(def-thread-api :thread-api/get-block-source
|
||||
[repo id]
|
||||
(when-let [conn (worker-state/get-datascript-conn repo)]
|
||||
(:db/id (first (:block/_alias (d/entity @conn id))))))
|
||||
|
||||
(def-thread-api :thread-api/block-refs-check
|
||||
[repo id {:keys [unlinked?]}]
|
||||
(when-let [conn (worker-state/get-datascript-conn repo)]
|
||||
|
||||
@@ -326,7 +326,8 @@ DROP TRIGGER IF EXISTS blocks_au;
|
||||
nil)
|
||||
:block/tags (seq (map :db/id (:block/tags block)))
|
||||
:page? (ldb/page? block)
|
||||
:alias (:block/title (first (:block/_alias block)))}))))))
|
||||
:alias (some-> (first (:block/_alias block))
|
||||
(select-keys [:block/uuid :block/title]))}))))))
|
||||
page-or-object-result (filter (fn [b] (or (:page? b) (:block/tags result))) result)]
|
||||
(->>
|
||||
(concat page-or-object-result
|
||||
|
||||
Reference in New Issue
Block a user