Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public constructor(config: WebexAdapterOptions) {
super();
this.options = {
...config
};
if (!this.options.access_token) {
let err = 'Missing required parameter `access_token`';
if (!this.options.enable_incomplete) {
throw new Error(err);
} else {
console.error(err);
}
} else {
this._api = Webex.init({
credentials: {
authorization: {
access_token: this.options.access_token
}
}
});
if (!this._api) {
let err = 'Could not create the Webex Teams API client';
if (!this.options.enable_incomplete) {
throw new Error(err);
} else {
console.error(err);
}
}
}