aws-user-service
Advanced tools
Comparing version 2.0.2 to 2.0.3
14
index.js
@@ -5,3 +5,3 @@ const MongoRepository = require('senter-mongo-repository') | ||
AWS.config.update({region: process.env.REGION}) | ||
var noOrganisationOptions = MongoRepository.BuildCallOptions(true, false) | ||
const noOrganisationOptions = MongoRepository.BuildCallOptions(true, false); | ||
@@ -137,7 +137,7 @@ module.exports = class AwsUserService { | ||
async updateUserAttributes(userId, attributes) { | ||
var params = { | ||
const params = { | ||
"UserAttributes": attributes, | ||
"Username": userId, | ||
"UserPoolId": this.userPoolId | ||
} | ||
}; | ||
return await this.cognitoidentityserviceprovider.adminUpdateUserAttributes(params).promise() | ||
@@ -176,3 +176,3 @@ } | ||
const emailAttribute = cognitoUser.Attributes.find(x => x.Name = 'email') | ||
const emailAttribute = cognitoUser.Attributes.find(x => x.Name == 'email') | ||
if (emailAttribute) { | ||
@@ -182,3 +182,3 @@ senterUser.email = emailAttribute.Value | ||
const stripeCustomerIdAttribute = cognitoUser.Attributes.find(x => x.Name = 'custom:stripe_customer_id') | ||
const stripeCustomerIdAttribute = cognitoUser.Attributes.find(x => x.Name == 'custom:stripe_customer_id') | ||
if (stripeCustomerIdAttribute) { | ||
@@ -188,5 +188,5 @@ senterUser.stripeCustomerId = stripeCustomerIdAttribute.Value | ||
const emailVerifiedAttribute = cognitoUser.Attributes.find(x => x.Name = 'email_verified') | ||
const emailVerifiedAttribute = cognitoUser.Attributes.find(x => x.Name == 'email_verified') | ||
if (emailVerifiedAttribute) { | ||
senterUser.emailVerified = emailVerifiedAttribute.Value.toLowerCase() == 'true' | ||
senterUser.emailVerified = emailVerifiedAttribute.Value.toLowerCase() === 'true' | ||
} | ||
@@ -193,0 +193,0 @@ |
{ | ||
"name": "aws-user-service", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Contain methods to work with asw user", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6641