diff --git a/core/routers/auth/routes.py b/core/routers/auth/routes.py index 274e821..5281052 100644 --- a/core/routers/auth/routes.py +++ b/core/routers/auth/routes.py @@ -78,7 +78,7 @@ async def wechat_login( if user is None: if not payload.encrypted_data or not payload.iv: await redis_conn.set(keyname, ujson.encode(wechat_session), ex=60 * 5) - raise HTTPException(4001, detail='首次登录需要用户授权信息') + return {'status': 4001, 'message': '首次登录需要用户授权信息'} if all([ # payload.phone,