修复 验证码错误,返回200,非401 的问题

This commit is contained in:
王思川 2022-01-19 10:42:47 +08:00
parent 4a84c04065
commit e021ea4692
1 changed files with 3 additions and 3 deletions

View File

@ -43,15 +43,15 @@ def api_verification_code(func):
res = find_data(v_client, v_database, v_collection, {"email": email})
if len(res) == 0:
return {"info": "验证码错误"}, 401
return {"info": "验证码错误"}, 200
if res[0]['vcode'] == vcode:
pass
else:
return {"info": "验证码错误"}, 401
return {"info": "验证码错误"}, 200
except Exception:
return {"info": "请求异常"}, 401
return {"info": "请求异常"}, 200
return func(*args, **kwargs)
return internal