api接口返回值增加报错堆栈
This commit is contained in:
parent
40a621db5b
commit
22150ebc8e
@ -100,6 +100,7 @@ def init():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/version', methods=["GET", 'POST'])
|
@api.route('/api/version', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def version():
|
def version():
|
||||||
"""
|
"""
|
||||||
版本
|
版本
|
||||||
@ -109,27 +110,25 @@ def version():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/contact_list', methods=["GET", 'POST'])
|
@api.route('/api/contact_list', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def contact_list():
|
def contact_list():
|
||||||
"""
|
"""
|
||||||
获取联系人列表
|
获取联系人列表
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
try:
|
# 获取联系人列表
|
||||||
# 获取联系人列表
|
# 从header中读取micro_path
|
||||||
# 从header中读取micro_path
|
micro_path = request.headers.get("micro_path")
|
||||||
micro_path = request.headers.get("micro_path")
|
if not micro_path:
|
||||||
if not micro_path:
|
micro_path = read_session(g.sf, "micro_path")
|
||||||
micro_path = read_session(g.sf, "micro_path")
|
start = request.json.get("start")
|
||||||
start = request.json.get("start")
|
limit = request.json.get("limit")
|
||||||
limit = request.json.get("limit")
|
|
||||||
|
|
||||||
contact_list = analyzer.get_contact_list(micro_path)
|
contact_list = analyzer.get_contact_list(micro_path)
|
||||||
save_session(g.sf, "user_list", contact_list)
|
save_session(g.sf, "user_list", contact_list)
|
||||||
if limit:
|
if limit:
|
||||||
contact_list = contact_list[int(start):int(start) + int(limit)]
|
contact_list = contact_list[int(start):int(start) + int(limit)]
|
||||||
return ReJson(0, contact_list)
|
return ReJson(0, contact_list)
|
||||||
except Exception as e:
|
|
||||||
return ReJson(9999, msg=str(e))
|
|
||||||
|
|
||||||
|
|
||||||
@api.route('/api/chat_count', methods=["GET", 'POST'])
|
@api.route('/api/chat_count', methods=["GET", 'POST'])
|
||||||
@ -193,6 +192,7 @@ def contact_count_list():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/msgs', methods=["GET", 'POST'])
|
@api.route('/api/msgs', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def get_msgs():
|
def get_msgs():
|
||||||
msg_path = request.headers.get("msg_path")
|
msg_path = request.headers.get("msg_path")
|
||||||
micro_path = request.headers.get("micro_path")
|
micro_path = request.headers.get("micro_path")
|
||||||
@ -229,6 +229,7 @@ def get_msgs():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/img', methods=["GET", 'POST'])
|
@api.route('/api/img', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def get_img():
|
def get_img():
|
||||||
"""
|
"""
|
||||||
获取图片
|
获取图片
|
||||||
@ -272,6 +273,7 @@ def get_audio(savePath):
|
|||||||
|
|
||||||
# 导出聊天记录
|
# 导出聊天记录
|
||||||
@api.route('/api/export', methods=["GET", 'POST'])
|
@api.route('/api/export', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def export():
|
def export():
|
||||||
"""
|
"""
|
||||||
导出聊天记录
|
导出聊天记录
|
||||||
@ -369,6 +371,7 @@ def export():
|
|||||||
|
|
||||||
# 这部分为专业工具的api
|
# 这部分为专业工具的api
|
||||||
@api.route('/api/wxinfo', methods=["GET", 'POST'])
|
@api.route('/api/wxinfo', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def get_wxinfo():
|
def get_wxinfo():
|
||||||
"""
|
"""
|
||||||
获取微信信息
|
获取微信信息
|
||||||
@ -382,6 +385,7 @@ def get_wxinfo():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/decrypt', methods=["GET", 'POST'])
|
@api.route('/api/decrypt', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def decrypt():
|
def decrypt():
|
||||||
"""
|
"""
|
||||||
解密
|
解密
|
||||||
@ -401,6 +405,7 @@ def decrypt():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/biasaddr', methods=["GET", 'POST'])
|
@api.route('/api/biasaddr', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def biasaddr():
|
def biasaddr():
|
||||||
"""
|
"""
|
||||||
BiasAddr
|
BiasAddr
|
||||||
@ -418,6 +423,7 @@ def biasaddr():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/api/merge', methods=["GET", 'POST'])
|
@api.route('/api/merge', methods=["GET", 'POST'])
|
||||||
|
@error9999
|
||||||
def merge():
|
def merge():
|
||||||
"""
|
"""
|
||||||
合并
|
合并
|
||||||
@ -437,5 +443,6 @@ def merge():
|
|||||||
|
|
||||||
|
|
||||||
@api.route('/')
|
@api.route('/')
|
||||||
|
@error9999
|
||||||
def index():
|
def index():
|
||||||
return render_template('index.html')
|
return render_template('index.html')
|
||||||
|
Loading…
Reference in New Issue
Block a user