mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user