fix: market auth error handling, identity field forwarding
This commit is contained in:
+4
-3
@@ -512,11 +512,12 @@ async def api_market_auth(data: dict):
|
||||
async with httpx.AsyncClient(timeout=10) as client:
|
||||
resp = await client.post(
|
||||
f"{url}/api/collections/users/auth-with-password",
|
||||
json={"identity": data.get("email"), "password": data.get("password")}
|
||||
json={"identity": data.get("email", data.get("identity","")), "password": data.get("password")}
|
||||
)
|
||||
return resp.json()
|
||||
result = resp.json()
|
||||
return result
|
||||
except Exception as e:
|
||||
return {"error": str(e)}
|
||||
return {"message": "服务器连接失败: " + str(e), "token": None}
|
||||
|
||||
|
||||
@router.post("/market/register")
|
||||
|
||||
Reference in New Issue
Block a user