Fix my rank

- Fix a bug that `my rank` doesn't work correctly (There may still be the problem)
This commit is contained in:
Lost-MSth
2022-08-25 13:40:16 +08:00
parent 732947a3f0
commit 574d2c9d9f
5 changed files with 65 additions and 80 deletions

View File

@@ -15,12 +15,12 @@ bp = Blueprint('auth', __name__, url_prefix='/auth')
@bp.route('/login', methods=['POST']) # 登录接口
@arc_try
def login():
if 'AppVersion' in request.headers: # 版本检查
headers = request.headers
if 'AppVersion' in headers: # 版本检查
if Config.ALLOW_APPVERSION:
if request.headers['AppVersion'] not in Config.ALLOW_APPVERSION:
if headers['AppVersion'] not in Config.ALLOW_APPVERSION:
raise NoAccess('Wrong app version.', 1203)
headers = request.headers
request.form['grant_type']
with Connect() as c:
id_pwd = headers['Authorization']