Commit 9b7ff7a1 authored by fangzhipeng's avatar fangzhipeng

测试环境关闭验证

parent 96190a9f
......@@ -18,14 +18,14 @@ def login_require(func):
raise BussinessException(error_type.NEED_LOGIN)
#正式环境对token进行校验
# if not config.isDebug:
token = request.headers.get('token')
if not user_id or not token:
raise BussinessException(error_type.NEED_LOGIN)
user_token = user_dao.select_user_token_info(token)
#token信息不存在或与存在信息不符合需要进行登录
if not (user_token and user_token.user_id == int(user_id)):
raise BussinessException(error_type.NEED_LOGIN)
if not config.isDebug:
token = request.headers.get('token')
if not user_id or not token:
raise BussinessException(error_type.NEED_LOGIN)
user_token = user_dao.select_user_token_info(token)
#token信息不存在或与存在信息不符合需要进行登录
if not (user_token and user_token.user_id == int(user_id)):
raise BussinessException(error_type.NEED_LOGIN)
return func(*args, **kwargs)
return decorator
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment