@vizzly/api-client
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -12,1 +12,2 @@ export * from './DashboardQuotaReached'; | ||
export * from './FailedToCreateGlobalLibrary'; | ||
export * from './FailedToDecryptDashboardBeforeClient'; |
@@ -28,1 +28,2 @@ "use strict"; | ||
__exportStar(require("./FailedToCreateGlobalLibrary"), exports); | ||
__exportStar(require("./FailedToDecryptDashboardBeforeClient"), exports); |
@@ -15,2 +15,3 @@ "use strict"; | ||
const FailedToCreateDashboard_1 = require("../errors/FailedToCreateDashboard"); | ||
const FailedToDecryptDashboardBeforeClient_1 = require("../errors/FailedToDecryptDashboardBeforeClient"); | ||
const FailedToFetchDashboardAccessTokens_1 = require("../errors/FailedToFetchDashboardAccessTokens"); | ||
@@ -75,4 +76,10 @@ const FailedToFetchDashboards_1 = require("../errors/FailedToFetchDashboards"); | ||
} | ||
if (dashboardResponse.status === 200) | ||
if (dashboardResponse.status === 200) { | ||
dashboardResponse.body.found.forEach((dashboard) => { | ||
if (typeof dashboard.definition === 'string') { | ||
throw new FailedToDecryptDashboardBeforeClient_1.FailedToDecryptDashboardBeforeClient(); | ||
} | ||
}); | ||
return dashboardResponse.body; | ||
} | ||
throw new FailedToFetchDashboards_1.FailedToFetchDashboards(`Failed to fetch dashboards. Got status code ${dashboardResponse.status}.`); | ||
@@ -79,0 +86,0 @@ }); |
{ | ||
"name": "@vizzly/api-client", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "NONE", |
116772
62
2793