This commit is contained in:
@@ -49,8 +49,9 @@ def login():
|
||||
return jsonify({'success': True, 'redirect': url_for('main.admin_page')})
|
||||
return redirect(url_for('main.admin_page'))
|
||||
except Exception as exc:
|
||||
current_app.logger.error('[auth] login error: %s', exc, exc_info=True)
|
||||
if wants_json:
|
||||
return jsonify({'success': False, 'error': str(exc)})
|
||||
return jsonify({'success': False, 'error': '登录失败,请稍后重试'})
|
||||
return render_html('login.html', error='登录失败,请稍后重试')
|
||||
if wants_json:
|
||||
return jsonify({'success': False, 'error': '用户名或密码错误'})
|
||||
|
||||
Reference in New Issue
Block a user