更新了新的视图

This commit is contained in:
MarkusJoe
2022-04-14 22:21:24 +08:00
parent 3cf3d03762
commit 81e90af094
11 files changed
+82 -27

No files matched your search

+11 -2
View File
@@ -119,11 +119,20 @@ def all_tables():
@api.route('/export/', methods=['GET', 'POST'])
@api.route('/export/<key>', methods=['GET', 'POST'])
@permission_required
def export(key: str = None):
def export():
"""
导出数据库文件
:return:
"""
return send_file('./db/data.sqlite', as_attachment=True)
@api.route('/test', methods=['GET', 'POST'])
def test_api():
"""
测试专用接口
:return:
"""
data = db().fetch('test-example')
return str(data[1])