diff options
author | Kirill Rogovoy <[email protected]> | 2021-07-20 21:24:52 +0300 |
---|---|---|
committer | Kirill Rogovoy <[email protected]> | 2021-07-20 21:24:52 +0300 |
commit | 5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb (patch) | |
tree | 273dfc086444533d86d580961c92ba8d14781a67 /org-roam-ui.el | |
parent | f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (diff) |
WIP
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r-- | org-roam-ui.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index 2d4eb98..9b8590e 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -50,15 +50,16 @@ (cons 'target (elt row 2)))) (defservlet* theme application/json () - (when 'doom-themes--colors + (progn + (if + (boundp 'doom-themes--colors) (let* - ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) - ui-theme (list nil)) - (progn - (dolist (color colors) - (push (cons (car color) (car (cdr color))) ui-theme)) - (insert (json-encode ui-theme)) - (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*"))))) - + ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) ui-theme (list nil)) + (progn + (dolist (color colors) + (push (cons (car color) (car (cdr color))) ui-theme)) + (insert (json-encode ui-theme)))) + (insert "{}")) + (httpd-send-header t "application/json" 200 :Access-Control-Allow-Origin "*"))) (provide 'org-roam-ui) |