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):