From c4e4a54a459b3010eac7afeacc4f465adb29884d Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Fri, 19 Apr 2024 18:29:12 +0800 Subject: [PATCH] fix --- pywxdump/api/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pywxdump/api/api.py b/pywxdump/api/api.py index 386097f..cd60006 100644 --- a/pywxdump/api/api.py +++ b/pywxdump/api/api.py @@ -66,13 +66,13 @@ def init_key(): key = request.json.get("key", "").strip().strip("'").strip('"') my_wxid = request.json.get("my_wxid", "").strip().strip("'").strip('"') if not wx_path: - return ReJson(1002) + return ReJson(1001, body=f"wx_path is required: {wx_path}") if not os.path.exists(wx_path): - return ReJson(1001, body=wx_path) + return ReJson(1002, body=f"wx_path not exists: {wx_path}") if not key: - return ReJson(1002) + return ReJson(1001, body=f"key is required: {key}") if not my_wxid: - return ReJson(1002) + return ReJson(1001, body=f"my_wxid is required: {my_wxid}") out_path = os.path.join(g.tmp_path, "decrypted", my_wxid) if my_wxid else os.path.join(g.tmp_path, "decrypted") if os.path.exists(out_path):