eprolo-cli 1.0.50 → 1.0.52
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 +3 -2
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -86,6 +86,7 @@ function postJson(url, body, headers = {}) {
|
|
|
86
86
|
// ---------------------------------------------------------------------------
|
|
87
87
|
|
|
88
88
|
async function postJsonWithRetry(url, body, config) {
|
|
89
|
+
let headers = {};
|
|
89
90
|
if (config.accessToken) headers["accessToken"] = `${config.accessToken}`;
|
|
90
91
|
|
|
91
92
|
let result = await postJson(url, body, headers);
|
|
@@ -188,8 +189,8 @@ async function queryOrders() {
|
|
|
188
189
|
console.error(JSON.stringify({ success: false, errorMessage: "未授权,请先登录" }));
|
|
189
190
|
process.exit(1);
|
|
190
191
|
}
|
|
191
|
-
|
|
192
|
-
const data = await postJsonWithRetry(ORDERS_API, {id
|
|
192
|
+
const id = process.env.orderId;
|
|
193
|
+
const data = await postJsonWithRetry(ORDERS_API, {id}, config);
|
|
193
194
|
console.log(JSON.stringify(data, null, 2));
|
|
194
195
|
process.exit(0);
|
|
195
196
|
}
|
package/package.json
CHANGED