管理后台 server 使用蓝图模式,降低维护成本,降低修改功能时对其他模块的影响
This commit is contained in:
@@ -32,7 +32,6 @@ def api_contacts_all():
|
||||
return jsonify({"success": False, "error": str(e)}), 500
|
||||
|
||||
@contacts_bp.route('/api/statistics', methods=['GET'])
|
||||
@login_required
|
||||
def api_contacts_statistics():
|
||||
"""获取联系人统计信息API"""
|
||||
try:
|
||||
|
||||
@@ -5,11 +5,11 @@ from robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus
|
||||
from datetime import datetime
|
||||
|
||||
# 创建机器人管理蓝图
|
||||
robot_bp = Blueprint('robot', __name__)
|
||||
robot_bp = Blueprint('robot', __name__, url_prefix='/robot')
|
||||
logger = logging.getLogger("RobotBlueprint")
|
||||
|
||||
# 机器人管理页面
|
||||
@robot_bp.route('/robot_management')
|
||||
@robot_bp.route('/')
|
||||
@login_required
|
||||
def robot_management():
|
||||
return render_template('robot_management.html')
|
||||
|
||||
Reference in New Issue
Block a user