管理后台 server 使用蓝图模式,降低维护成本,降低修改功能时对其他模块的影响
This commit is contained in:
@@ -3,11 +3,11 @@ from .auth import login_required
|
||||
import logging
|
||||
|
||||
# 创建联系人管理蓝图
|
||||
contacts_bp = Blueprint('contacts', __name__)
|
||||
contacts_bp = Blueprint('contacts', __name__, url_prefix='/contacts')
|
||||
logger = logging.getLogger("ContactsBlueprint")
|
||||
|
||||
# 联系人管理页面
|
||||
@contacts_bp.route('/contacts')
|
||||
@contacts_bp.route('/')
|
||||
@login_required
|
||||
def contacts_management():
|
||||
"""通讯录管理页面"""
|
||||
@@ -32,6 +32,7 @@ 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:
|
||||
|
||||
Reference in New Issue
Block a user