eprolo-cli 1.0.115 → 1.0.117

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
@@ -47,10 +47,8 @@ function readFlag(argv, flag) {
47
47
  function postJson(url, body, headers = {}, method = "POST") {
48
48
  const config = readConfig();
49
49
  let signValue = {}
50
- if (config.timestamp) {
51
- signValue.timestamp = config.timestamp;
52
- signValue.sign = config.accessToken;
53
- }
50
+ signValue.timestamp = `${Date.now()}`;
51
+ signValue.sign = config.accessToken;
54
52
  if (method == "GET") {
55
53
  signValue = { ...signValue, ...body };
56
54
  }
@@ -102,7 +100,6 @@ function postJson(url, body, headers = {}, method = "POST") {
102
100
  async function postJsonWithRetry(url, body, config, method = "POST") {
103
101
  let headers = {};
104
102
  if (config.apiKey) headers["apiKey"] = `${config.apiKey}`;
105
- headers["timestamp"] = `${Date.now()}`;
106
103
  let result = await postJson(url, body, headers, method);
107
104
  if (result.data.code == '-1') {
108
105
  // 刷新 token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
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"