|
|
@@ -1435,12 +1435,13 @@ def syncUserJsonConfigs(token):
|
|
|
@app.post("/sync_sys_configs", description="同步线上配置到本地")
|
|
|
def sync_sys_configs(params: SyncLocalConfigs):
|
|
|
hlm_token = params.token
|
|
|
+ env = params.env
|
|
|
headers = {
|
|
|
"Authorization": f"Bearer {hlm_token}",
|
|
|
"content-type": "application/json",
|
|
|
}
|
|
|
# 追加配置参数 machine_type 拍照机设备类型;0鞋;1服装
|
|
|
- url = settings.DOMAIN + f"/api/ai_image/camera_machine/get_all_user_configs?machine_type={MACHINE_TYPE}"
|
|
|
+ url = settings.getDoman(env) + f"/api/ai_image/camera_machine/get_all_user_configs?machine_type={MACHINE_TYPE}"
|
|
|
result = requests.get(url=url, headers=headers)
|
|
|
sys_configs = result.json().get("data", {}).get("configs")
|
|
|
session = SqlQuery()
|
|
|
@@ -1473,11 +1474,12 @@ def sync_sys_configs(params: SyncLocalConfigs):
|
|
|
@app.post("/sync_actions", description="同步左右脚配置到本地")
|
|
|
def sync_action_configs(params: SyncLocalConfigs):
|
|
|
hlm_token = params.token
|
|
|
+ env = params.env
|
|
|
headers = {
|
|
|
"Authorization": f"Bearer {hlm_token}",
|
|
|
"content-type": "application/json",
|
|
|
}
|
|
|
- url = settings.DOMAIN + f"/api/ai_image/camera_machine/get_all_user_tabs?machine_type={MACHINE_TYPE}"
|
|
|
+ url = settings.getDoman(env) + f"/api/ai_image/camera_machine/get_all_user_tabs?machine_type={MACHINE_TYPE}"
|
|
|
result = requests.get(url=url, headers=headers)
|
|
|
session = SqlQuery()
|
|
|
deviceConfigs = CRUD(DeviceConfig)
|