@ajustee/cc-frontoffice-browser
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -21,4 +21,7 @@ "use strict"; | ||
}); | ||
const res = await response.json(); | ||
return { statusCode: response.status, ccKeys: res }; | ||
const statusCode = response.status; | ||
if (statusCode !== 200) | ||
throw new Error(`Invalid response code: ${statusCode}`); | ||
const keys = await response.json(); | ||
return { statusCode, ccKeys: keys }; | ||
} | ||
@@ -35,6 +38,9 @@ async getConfigKeys2(headers, path) { | ||
}); | ||
const res = await response.json(); | ||
return { statusCode: response.status, ccKeys: res }; | ||
const statusCode = response.status; | ||
if (statusCode !== 200) | ||
throw new Error(`Invalid response code: ${statusCode}`); | ||
const keys = await response.json(); | ||
return { statusCode, ccKeys: keys }; | ||
} | ||
} | ||
exports.CcFrontOffice = CcFrontOffice; |
{ | ||
"name": "@ajustee/cc-frontoffice-browser", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Ajustee Config Center FrontOffice Browser API", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
2987
75