@@ -66,13 +66,13 @@ def init_key():
66
66
key = request .json .get ("key" , "" ).strip ().strip ("'" ).strip ('"' )
67
67
my_wxid = request .json .get ("my_wxid" , "" ).strip ().strip ("'" ).strip ('"' )
68
68
if not wx_path :
69
- return ReJson (1001 , body = f"wx_path is required: { wx_path } " )
69
+ return ReJson (1002 , body = f"wx_path is required: { wx_path } " )
70
70
if not os .path .exists (wx_path ):
71
- return ReJson (1002 , body = f"wx_path not exists: { wx_path } " )
71
+ return ReJson (1001 , body = f"wx_path not exists: { wx_path } " )
72
72
if not key :
73
- return ReJson (1001 , body = f"key is required: { key } " )
73
+ return ReJson (1002 , body = f"key is required: { key } " )
74
74
if not my_wxid :
75
- return ReJson (1001 , body = f"my_wxid is required: { my_wxid } " )
75
+ return ReJson (1002 , body = f"my_wxid is required: { my_wxid } " )
76
76
77
77
out_path = os .path .join (g .tmp_path , "decrypted" , my_wxid ) if my_wxid else os .path .join (g .tmp_path , "decrypted" )
78
78
if os .path .exists (out_path ):
@@ -110,13 +110,13 @@ def init_nokey():
110
110
my_wxid = request .json .get ("my_wxid" , "" ).strip ().strip ("'" ).strip ('"' )
111
111
112
112
if not wx_path :
113
- return ReJson (1002 )
113
+ return ReJson (1002 , body = f"wx_path is required: { wx_path } " )
114
114
if not os .path .exists (wx_path ):
115
- return ReJson (1001 , body = wx_path )
115
+ return ReJson (1001 , body = f" wx_path not exists: { wx_path } " )
116
116
if not merge_path :
117
- return ReJson (1002 )
117
+ return ReJson (1002 , body = f"merge_path is required: { merge_path } " )
118
118
if not my_wxid :
119
- return ReJson (1002 )
119
+ return ReJson (1002 , body = f"my_wxid is required: { my_wxid } " )
120
120
121
121
key = read_session (g .sf , my_wxid , "key" )
122
122
0 commit comments