@hlw-uni-mp/request 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6959,7 +6959,7 @@ function doUpload(cred, filePath, customHeader) {
|
|
|
6959
6959
|
}
|
|
6960
6960
|
try {
|
|
6961
6961
|
const body = typeof res.data === "string" ? JSON.parse(res.data) : res.data;
|
|
6962
|
-
body
|
|
6962
|
+
body.code === 1 ? resolve() : reject(new Error(body.msg || "\u4E0A\u4F20\u5931\u8D25"));
|
|
6963
6963
|
} catch {
|
|
6964
6964
|
reject(new Error("\u54CD\u5E94\u89E3\u6790\u5931\u8D25"));
|
|
6965
6965
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -6933,7 +6933,7 @@ function doUpload(cred, filePath, customHeader) {
|
|
|
6933
6933
|
}
|
|
6934
6934
|
try {
|
|
6935
6935
|
const body = typeof res.data === "string" ? JSON.parse(res.data) : res.data;
|
|
6936
|
-
body
|
|
6936
|
+
body.code === 1 ? resolve() : reject(new Error(body.msg || "\u4E0A\u4F20\u5931\u8D25"));
|
|
6937
6937
|
} catch {
|
|
6938
6938
|
reject(new Error("\u54CD\u5E94\u89E3\u6790\u5931\u8D25"));
|
|
6939
6939
|
}
|
package/package.json
CHANGED