调整通讯录管理
This commit is contained in:
@@ -206,25 +206,7 @@ class DashboardServer:
|
|||||||
self.logger.error(f"获取所有联系人信息失败: {e}")
|
self.logger.error(f"获取所有联系人信息失败: {e}")
|
||||||
return jsonify({"success": False, "error": str(e)}), 500
|
return jsonify({"success": False, "error": str(e)}), 500
|
||||||
|
|
||||||
@app.route('/api/contacts/personal', methods=['GET'])
|
# 修改联系人统计信息API
|
||||||
@login_required
|
|
||||||
def api_contacts_personal():
|
|
||||||
"""获取个人联系人信息API"""
|
|
||||||
try:
|
|
||||||
contacts = self.contact_manager.get_contacts()
|
|
||||||
personal_contacts = {wxid: name for wxid, name in contacts.items()
|
|
||||||
if '@@' not in wxid and '@chatroom' not in wxid}
|
|
||||||
|
|
||||||
return jsonify({
|
|
||||||
"success": True,
|
|
||||||
"data": {
|
|
||||||
"personal": personal_contacts
|
|
||||||
}
|
|
||||||
})
|
|
||||||
except Exception as e:
|
|
||||||
self.logger.error(f"获取个人联系人信息失败: {e}")
|
|
||||||
return jsonify({"success": False, "error": str(e)}), 500
|
|
||||||
|
|
||||||
@app.route('/api/contacts/statistics', methods=['GET'])
|
@app.route('/api/contacts/statistics', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def api_contacts_statistics():
|
def api_contacts_statistics():
|
||||||
|
|||||||
Reference in New Issue
Block a user