Put indexer API endpoint under /api path segment

Update FastAPI app router, desktop app and to use new url path to
batch indexer API endpoint

All api endpoints should exist under /api path segment
This commit is contained in:
Debanjum Singh Solanky
2023-10-09 21:35:58 -07:00
parent 148e8f468f
commit 6aa69da3ef
3 changed files with 5 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ def test_index_batch(client):
headers = {"x-api-key": "secret"}
# Act
response = client.post("/v1/indexer/batch", json=request_body, headers=headers)
response = client.post("/api/v1/indexer/batch", json=request_body, headers=headers)
# Assert
assert response.status_code == 200
@@ -81,7 +81,7 @@ def test_regenerate_with_valid_content_type(client):
headers = {"x-api-key": "secret"}
# Act
response = client.post(f"/v1/indexer/batch?search_type={content_type}", json=request_body, headers=headers)
response = client.post(f"/api/v1/indexer/batch?search_type={content_type}", json=request_body, headers=headers)
# Assert
assert response.status_code == 200, f"Returned status: {response.status_code} for content type: {content_type}"
@@ -97,7 +97,7 @@ def test_regenerate_with_github_fails_without_pat(client):
headers = {"x-api-key": "secret"}
# Act
response = client.post(f"/v1/indexer/batch?search_type=github", json=request_body, headers=headers)
response = client.post(f"/api/v1/indexer/batch?search_type=github", json=request_body, headers=headers)
# Assert
assert response.status_code == 200, f"Returned status: {response.status_code} for content type: github"