代码优化
This commit is contained in:
parent
3ce1eb8486
commit
203b4ff697
6
main.py
6
main.py
|
|
@ -114,11 +114,11 @@ async def update_account(account_data: AccountUpdate, account_manager: Any = Dep
|
|||
where_conditions = "account_id = %s and app_name = %s "
|
||||
result = await account_manager.update_account_info(set_param=set_param, where_conditions=where_conditions, params=params)
|
||||
if result:
|
||||
return {"code": 200, "message": "删除账号状态修改成功", "data": result}
|
||||
raise HTTPException(status_code=404, detail="删除账号状态修改失败")
|
||||
return {"code": 200, "message": "账号状态修改成功", "data": result}
|
||||
raise HTTPException(status_code=404, detail="账号状态修改失败")
|
||||
except Exception as e:
|
||||
print(f"新增账号失败: {e}")
|
||||
raise HTTPException(status_code=500, detail="删除账号失败,请重试,失败原因:{}".format(e))
|
||||
raise HTTPException(status_code=500, detail="账号失败,请重试,失败原因:{}".format(e))
|
||||
|
||||
|
||||
@app.post("/receive_data", summary="接收抓取得数据")
|
||||
|
|
|
|||
Loading…
Reference in New Issue