Configure API routes after set up search types while configuring server

Configure app routes after configuring server.
Import API routers after search type is dynamically populated.
Allow API to recognize the dynamically populated plugin search types
as valid type query param.
Enable searching for plugin type content.
This commit is contained in:
Debanjum Singh Solanky
2023-02-24 03:06:58 -06:00
parent d91c7e2761
commit 68bd5d9ebc
3 changed files with 20 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ from fastapi.testclient import TestClient
# Internal Packages
from khoj.main import app
from khoj.configure import configure_routes
from khoj.utils.state import model, config
from khoj.search_type import text_search, image_search
from khoj.utils.rawconfig import ContentConfig, SearchConfig
@@ -19,6 +20,7 @@ from khoj.search_filter.file_filter import FileFilter
# Arrange
# ----------------------------------------------------------------------------------------------------
configure_routes(app)
client = TestClient(app)