Spaces:
Building
Building
Update config_controller.py
Browse files- config_controller.py +1 -1
config_controller.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from fastapi import APIRouter, Request, HTTPException
|
2 |
from service_config import ServiceConfig
|
|
|
3 |
|
4 |
router = APIRouter()
|
5 |
service_config = ServiceConfig()
|
@@ -29,7 +30,6 @@ async def update_config(request: Request):
|
|
29 |
service_config.spark_endpoint = spark_endpoint
|
30 |
|
31 |
with open(service_config.config_path, "w", encoding="utf-8") as f:
|
32 |
-
import json
|
33 |
json.dump(service_config, f, indent=2)
|
34 |
|
35 |
return {"message": "Configuration updated successfully"}
|
|
|
1 |
from fastapi import APIRouter, Request, HTTPException
|
2 |
from service_config import ServiceConfig
|
3 |
+
import json
|
4 |
|
5 |
router = APIRouter()
|
6 |
service_config = ServiceConfig()
|
|
|
30 |
service_config.spark_endpoint = spark_endpoint
|
31 |
|
32 |
with open(service_config.config_path, "w", encoding="utf-8") as f:
|
|
|
33 |
json.dump(service_config, f, indent=2)
|
34 |
|
35 |
return {"message": "Configuration updated successfully"}
|