Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async _updateEndpoint(endpointObject: EventObject) {
const { params, handlers } = endpointObject;
const { config, event } = params;
const { appId, endpointId } = config;
const request = this._endpointRequest(
config,
JS.transferKeyToLowerCase(
event,
[],
['attributes', 'userAttributes', 'Attributes', 'UserAttributes']
)
);
const update_params = {
ApplicationId: appId,
EndpointId: endpointId,
EndpointRequest: request,
};
try {
const data = await this.pinpointClient
.updateEndpoint(update_params)
.promise();