mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 19:03:01 +01:00
Fix triggering index update on khoj server from khoj.el
This commit is contained in:
parent
5c7d7f558d
commit
4d910936b7
1 changed files with 3 additions and 2 deletions
|
@ -624,7 +624,7 @@ CONFIG is json obtained from Khoj config API."
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
;; Update index on khoj server after configuration update
|
;; Update index on khoj server after configuration update
|
||||||
(let ((khoj--server-ready? nil))
|
(let ((khoj--server-ready? nil))
|
||||||
(url-retrieve (format "%s/api/update?t=org&client=emacs" khoj-server-url) #'identity)))
|
(url-retrieve (format "%s/api/update?client=emacs" khoj-server-url) #'identity)))
|
||||||
|
|
||||||
(defun khoj--get-enabled-content-types ()
|
(defun khoj--get-enabled-content-types ()
|
||||||
"Get content types enabled for search from API."
|
"Get content types enabled for search from API."
|
||||||
|
@ -1032,7 +1032,8 @@ Paragraph only starts at first text after blank line."
|
||||||
(let* ((force-update (if (member "--force-update" args) "true" "false"))
|
(let* ((force-update (if (member "--force-update" args) "true" "false"))
|
||||||
;; set content type to: specified > last used > based on current buffer > default type
|
;; set content type to: specified > last used > based on current buffer > default type
|
||||||
(content-type (or (transient-arg-value "--content-type=" args) (khoj--buffer-name-to-content-type (buffer-name))))
|
(content-type (or (transient-arg-value "--content-type=" args) (khoj--buffer-name-to-content-type (buffer-name))))
|
||||||
(update-url (format "%s/api/update?t=%s&force=%s&client=emacs" khoj-server-url content-type force-update))
|
(type-query (if (equal content-type "all") "" (format "t=%s" content-type)))
|
||||||
|
(update-url (format "%s/api/update?%s&force=%s&client=emacs" khoj-server-url type-query force-update))
|
||||||
(url-request-method "GET"))
|
(url-request-method "GET"))
|
||||||
(progn
|
(progn
|
||||||
(setq khoj--content-type content-type)
|
(setq khoj--content-type content-type)
|
||||||
|
|
Loading…
Reference in a new issue