修复 验证码错误,返回200,非401 的问题
This commit is contained in:
parent
4a84c04065
commit
e021ea4692
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue