@baasix/sdk 0.1.3 → 0.1.4
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/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/auth.cjs +3 -3
- package/dist/modules/auth.cjs.map +1 -1
- package/dist/modules/auth.js +3 -3
- package/dist/modules/auth.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -603,9 +603,9 @@ var AuthModule = class {
|
|
|
603
603
|
async getUser() {
|
|
604
604
|
try {
|
|
605
605
|
const response = await this.client.get("/auth/me");
|
|
606
|
-
this.currentUser = response.
|
|
607
|
-
await this.storage.set(STORAGE_KEYS.USER, JSON.stringify(response.
|
|
608
|
-
return response.
|
|
606
|
+
this.currentUser = response.user;
|
|
607
|
+
await this.storage.set(STORAGE_KEYS.USER, JSON.stringify(response.user));
|
|
608
|
+
return response.user;
|
|
609
609
|
} catch (error) {
|
|
610
610
|
if (error instanceof BaasixError && error.status === 401) {
|
|
611
611
|
await this.clearAuth();
|