This commit is contained in:
@@ -132,14 +132,14 @@
|
|||||||
(defn backlinks
|
(defn backlinks
|
||||||
"Returns a collection of maps {:id …, :title …}."
|
"Returns a collection of maps {:id …, :title …}."
|
||||||
[node]
|
[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
|
(sql/execute! (ds) ["select distinct nodes.id, nodes.title from links
|
||||||
inner join nodes
|
inner join nodes
|
||||||
on nodes.id = links.source
|
on nodes.id = links.source
|
||||||
where links.dest = ?"
|
where links.dest = ?"
|
||||||
(elisp/print (:id node))])
|
(elisp/print (str (:id node)))])
|
||||||
:let [id (elisp/read-string id)]
|
:when (-> id elisp/read-string parse-uuid
|
||||||
:when (graph-visible? (get-node (UUID/fromString id)))]
|
get-node public?)]
|
||||||
{:id id
|
{:id id
|
||||||
:title (elisp/read-string title)}))
|
:title (elisp/read-string title)}))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user