curtain-web-api 1.0.26 → 1.0.27

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.
@@ -24,7 +24,7 @@ export declare class User {
24
24
  init(): Promise<void | undefined>;
25
25
  initiateDB(): Promise<void>;
26
26
  updateDB(): Promise<void>;
27
- saveIntoDB(): Promise<void>;
27
+ saveIntoDB(): Promise<void | undefined>;
28
28
  loadFromDB(): Promise<void>;
29
29
  clearDB(): Promise<void>;
30
30
  reset(): void;
@@ -105,6 +105,10 @@ class User {
105
105
  console.log(response);
106
106
  }).catch((error) => {
107
107
  console.log(error);
108
+ console.log(this.loginStatus);
109
+ if (error.name === "conflict") {
110
+ return this.updateDB();
111
+ }
108
112
  });
109
113
  }
110
114
  loadFromDB() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -113,6 +113,10 @@ export class User {
113
113
  console.log(response);
114
114
  }).catch((error) => {
115
115
  console.log(error);
116
+ console.log(this.loginStatus);
117
+ if (error.name === "conflict") {
118
+ return this.updateDB();
119
+ }
116
120
  });
117
121
  }
118
122