summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-24 19:49:59 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-24 19:49:59 +0200
commit9c4a9cb1fb077670db048250c902031a9cda9210 (patch)
tree5992f351d0eb1fa6e6806df85a70e929b4b21106 /org-roam-ui.el
parent149c8973929170d57c0ab31618878bc63b4e6348 (diff)
added filter and orphan toggle
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 560315b..d823e77 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -78,11 +78,11 @@ This serves the web-build and API over HTTP."
(defservlet* graph application/json ()
(let* ((nodes-columns [id file title level])
- (links-columns [source dest])
+ (links-columns [source dest type])
(nodes-db-rows (org-roam-db-query `[:select ,nodes-columns :from nodes]))
- (links-db-rows (org-roam-db-query `[:select ,links-columns :from links :where (= type "id")]))
+ (links-db-rows (org-roam-db-query `[:select ,links-columns :from links :where (or (= type "id") (= type "cite"))]))
(response (json-encode `((nodes . ,(mapcar (apply-partially #'org-roam-ui-sql-to-alist (append nodes-columns nil)) nodes-db-rows))
- (links . ,(mapcar (apply-partially #'org-roam-ui-sql-to-alist '(source target)) links-db-rows))))))
+ (links . ,(mapcar (apply-partially #'org-roam-ui-sql-to-alist '(source target type)) links-db-rows))))))
(insert response)
(httpd-send-header t "application/json" 200 :Access-Control-Allow-Origin "*")))