From a32e51b7551fbaa6fed5b8c9436879d79560f6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 28 Mar 2026 23:34:59 -0600 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=82=AC=EC=A4=91:=20feat:=20backlink?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publisher/src/net/deertopia/publisher/roam.clj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/publisher/src/net/deertopia/publisher/roam.clj b/publisher/src/net/deertopia/publisher/roam.clj index c281d3c..ac3fcca 100644 --- a/publisher/src/net/deertopia/publisher/roam.clj +++ b/publisher/src/net/deertopia/publisher/roam.clj @@ -132,14 +132,14 @@ (defn backlinks "Returns a collection of maps {:id …, :title …}." [node] - (for [{id :nodes/id, title :nodes/title} + (for [{id :nodes/id title :nodes/title} (sql/execute! (ds) ["select distinct nodes.id, nodes.title from links - inner join nodes - on nodes.id = links.source - where links.dest = ?" - (elisp/print (:id node))]) - :let [id (elisp/read-string id)] - :when (graph-visible? (get-node (UUID/fromString id)))] + inner join nodes + on nodes.id = links.source + where links.dest = ?" + (elisp/print (str (:id node)))]) + :when (-> id elisp/read-string parse-uuid + get-node public?)] {:id id :title (elisp/read-string title)}))