How to use the @aws-amplify/core.JS.transferKeyToLowerCase function in @aws-amplify/core

To help you get started, we’ve selected a few @aws-amplify/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-js / packages / analytics / src / Providers / AWSPinpointProvider.ts View on Github external
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();