Update indexer API endpoint query params for force, content type

New URL query params, `force' and `t' match name of query parameter in
existing Khoj API endpoints

Update Desktop, Obsidian and Emacs client to call using these new API
query params. Set `client' query param from each client for telemetry
visibility
This commit is contained in:
Debanjum Singh Solanky
2023-10-17 04:42:04 -07:00
parent 84654ffc5d
commit 5efae1ad55
5 changed files with 20 additions and 16 deletions

View File

@@ -80,7 +80,7 @@ def test_regenerate_with_valid_content_type(client):
headers = {"x-api-key": "secret"}
# Act
response = client.post(f"/api/v1/index/update?search_type={content_type}", files=files, headers=headers)
response = client.post(f"/api/v1/index/update?t={content_type}", files=files, headers=headers)
# Assert
assert response.status_code == 200, f"Returned status: {response.status_code} for content type: {content_type}"
@@ -95,7 +95,7 @@ def test_regenerate_with_github_fails_without_pat(client):
headers = {"x-api-key": "secret"}
# Act
response = client.post(f"/api/v1/index/update?search_type=github", files=files, headers=headers)
response = client.post(f"/api/v1/index/update?t=github", files=files, headers=headers)
# Assert
assert response.status_code == 200, f"Returned status: {response.status_code} for content type: github"