eprolo-cli 1.0.56 → 1.0.58

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/bin/eprolo-cli.js CHANGED
@@ -91,7 +91,7 @@ async function postJsonWithRetry(url, body, config) {
91
91
 
92
92
  let result = await postJson(url, body, headers);
93
93
 
94
- if (result.code === 401) {
94
+ if (result.code === 400) {
95
95
  // 刷新 token
96
96
  const refreshRes = await postJson(REFRESH_API, {},{
97
97
  refreshToken: config.refreshToken
@@ -111,9 +111,7 @@ async function postJsonWithRetry(url, body, config) {
111
111
  err.response = refreshRes.data;
112
112
  throw err;
113
113
  }
114
- }
115
-
116
- if (result.code !== 0) {
114
+ }else if (result.code !== 0) {
117
115
  const err = new Error(`HTTP ${result.statusCode}`);
118
116
  err.response = result.data;
119
117
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "CLI for Dianxiaobao ICBU AI publishing, authorization profile management, task submission, and task status checks.",
5
5
  "bin": {
6
6
  "eprolo": "bin/eprolo-cli.js"