mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 13:20:17 +00:00
Create /config/data/default API endpoint to serve default khoj config
This can ease configuring khoj from the different interfaces - Don't need to know all the (default) config used by khoj. - Just get default config by calling the above API endpoint. - Then modify desired portions and call POST /api/config/data to configure khoj.
This commit is contained in:
@@ -21,6 +21,10 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# Create Routes
|
||||
@api.get('/config/data/default')
|
||||
def get_default_config_data():
|
||||
return constants.default_config
|
||||
|
||||
@api.get('/config/data', response_model=FullConfig)
|
||||
def get_config_data():
|
||||
return state.config
|
||||
|
||||
Reference in New Issue
Block a user