From 77da4a8741ef5c04c616bec050642eb6432b4da4 Mon Sep 17 00:00:00 2001 From: zhao-zg <61549925+zhao-zg@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:04:37 +0800 Subject: [PATCH] Update api.py --- api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api.py b/api.py index 9c7ab28..40dbc64 100644 --- a/api.py +++ b/api.py @@ -77,11 +77,12 @@ def mr(status, **kwargs): async def login(): print("login") data = await request.get_json() - data["type"] = "password" + if "type" not in data: + data["type"] = "password" return loginPublic(data) # 启动登录线程 -@app.route("/loginPassword", methods=["POST"]) +@app.route("/loginNew", methods=["POST"]) async def loginNew(): print("loginPassword") data = await request.get_json()