@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 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.data;
607
- await this.storage.set(STORAGE_KEYS.USER, JSON.stringify(response.data));
608
- return response.data;
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();