vtb-appit 0.0.66 → 0.0.67

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.
Files changed (2) hide show
  1. package/appit.js +8 -1
  2. package/package.json +1 -1
package/appit.js CHANGED
@@ -589,9 +589,10 @@ class Appit {
589
589
  return Promise.all(promises);
590
590
  }
591
591
 
592
- request(method, path, data)
592
+ async request(method, path, data)
593
593
  {
594
594
  const payload = (data) ? JSON.stringify(data).toString("utf8") : false;
595
+ await this.sleep(500);
595
596
 
596
597
  return new Promise((resolve, reject) => {
597
598
  const options = {
@@ -622,6 +623,8 @@ class Appit {
622
623
  try {
623
624
  resolve(JSON.parse(result))
624
625
  } catch {
626
+ console.log('ERROR');
627
+ console.log(result);
625
628
  reject(false);
626
629
  }
627
630
 
@@ -949,6 +952,10 @@ class Appit {
949
952
  {
950
953
  return await this.request('PUT', `workspaces/${workspace_id}/excursions/${this.history.excursionId}/settings`, data);
951
954
  }
955
+
956
+ sleep(delay) {
957
+ return new Promise((resolve) => setTimeout(resolve, delay))
958
+ }
952
959
  }
953
960
 
954
961
  module.exports = { Appit };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtb-appit",
3
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {