mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 21:29:12 +00:00
Update indexer API endpoint URL to index/update from indexer/batch
New URL follows action oriented endpoint naming convention used for other Khoj API endpoints Update desktop, obsidian and emacs client to call this new API endpoint
This commit is contained in:
@@ -163,7 +163,7 @@ function pushDataToKhoj (regenerate = false) {
|
||||
const headers = {
|
||||
'x-api-key': 'secret'
|
||||
};
|
||||
axios.post(`${hostURL}/api/v1/indexer/batch?regenerate=${regenerate}`, formData, { headers })
|
||||
axios.post(`${hostURL}/api/v1/index/update?regenerate=${regenerate}`, formData, { headers })
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
|
||||
@@ -550,7 +550,7 @@ CONFIG is json obtained from Khoj config API."
|
||||
(url-request-extra-headers `(("content-type" . ,(format "multipart/form-data; boundary=%s" boundary))
|
||||
("x-api-key" . ,khoj-server-api-key))))
|
||||
(with-current-buffer
|
||||
(url-retrieve (format "%s/api/v1/indexer/batch" khoj-server-url)
|
||||
(url-retrieve (format "%s/api/v1/index/update" khoj-server-url)
|
||||
;; render response from indexing API endpoint on server
|
||||
(lambda (status)
|
||||
(if (not status)
|
||||
|
||||
@@ -68,7 +68,7 @@ export async function updateContentIndex(vault: Vault, setting: KhojSetting, las
|
||||
}
|
||||
|
||||
// Call Khoj backend to update index with all markdown, pdf files
|
||||
const response = await fetch(`${setting.khojUrl}/api/v1/indexer/batch?regenerate=${regenerate}`, {
|
||||
const response = await fetch(`${setting.khojUrl}/api/v1/index/update?regenerate=${regenerate}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'x-api-key': 'secret',
|
||||
|
||||
Reference in New Issue
Block a user