Commit 0cea2c6c authored by uuo00_n's avatar uuo00_n

fix(api): 将绑定数据中的_id字段转换为字符串

确保返回的绑定数据中所有ObjectId字段都被转换为字符串,保持数据格式一致
parent b5ec3433
......@@ -41,6 +41,7 @@ async def me(current_user: dict = Depends(get_current_active_user)):
b = await get_binding_by_account(str(current_user["_id"]))
if not b:
raise HTTPException(status_code=404, detail="未绑定人物")
b["_id"] = str(b["_id"])
b["account_id"] = str(b["account_id"])
b["person_id"] = str(b["person_id"])
return b
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment