fixed a bug

This commit is contained in:
2026-02-27 11:36:41 +08:00
parent 521a575c31
commit bb465c7707
2 changed files with 6 additions and 2 deletions

4
app.py
View File

@@ -1715,7 +1715,9 @@ def api_register_mobile():
@app.route('/api/login', methods=['POST'])
def api_login():
data = request.get_json()
data = request.get_json(force=True, silent=True)
if not data:
return jsonify({'success': False, 'message': '请求数据格式错误'}), 400
email = data.get('email', '')
password = data.get('password', '')