dotcms
Version:
This library allows you to interact with DotCMS API's easily from the browser, nodejs and React Native. [Full Documentation](https://dotcms.github.io/core-web/dotcms/)
32 lines • 947 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.DotApiConfiguration = void 0;
const tslib_1 = require("tslib");
/**
* Get the information of DotCMS configuration
*
*/
class DotApiConfiguration {
constructor(httpClient) {
this.dotCMSHttpClient = httpClient;
}
// TODO: CATCH THIS ERROR
get() {
return this.dotCMSHttpClient
.request({
url: '/api/v1/configuration'
})
.then((response) => tslib_1.__awaiter(this, void 0, void 0, function* () {
if (response.status === 200) {
const data = yield response.json();
return data.entity;
}
throw {
message: yield response.text(),
statusCode: response.status
};
}));
}
}
exports.DotApiConfiguration = DotApiConfiguration;
//# sourceMappingURL=DotApiConfiguration.js.map
;