From 5eec46605bed2d8894bdebead57133a89601f8f0 Mon Sep 17 00:00:00 2001 From: lan-air Date: Sat, 10 Dec 2022 23:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=96=E4=BB=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e668afa..e81b406 100644 --- a/main.py +++ b/main.py @@ -154,7 +154,11 @@ async def index(request: Request, code: str, db: Session = Depends(get_db)): threading.Thread(target=delete_file, args=([{'type': info.type, 'text': info.text}],)).start() db.delete(info) db.commit() - return {'code': 200, 'msg': '取件成功,请点击"取"查看', 'data': info} + return { + 'code': 200, + 'msg': '取件成功,请点击"取"查看', + 'data': {'type': info.type, 'text': info.text, 'name': info.name, 'code': info.code} + } @app.post('/share')