修复无法使用的bug

This commit is contained in:
MarkusJoe
2022-02-19 11:48:15 +08:00
parent 8c89f4a024
commit e28e4d52de
5 files changed
+23 -13

No files matched your search

+11 -1
View File
@@ -93,7 +93,17 @@ def error(reason) -> Response:
return jsonify({'code': 500, 'msg': '服务器内部错误', 'data': None})
@app.route('/get/log', methods=['GET', 'POST'])
@app.route('/extra/db')
def export_db():
"""
导出数据库
:return:
"""
dir_path = os.path.join(app.root_path, 'bin/db')
return send_from_directory(dir_path, 'count.db', as_attachment=True)
@app.route('/extra/log', methods=['GET', 'POST'])
def view_log() -> Response:
"""
下载日志