summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
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 "*")))