Skip to content

Commit

Permalink
fix: change attribute condition
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Sep 17, 2024
1 parent bea3a0e commit b4e3822
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/domain/user/service/createAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ export const STANDARD_ATTRIBUTE_NAMES = [
export const toAttributeTypes = (user: UserEntity): AttributeType[] => {
return [
{ Name: 'sub', Value: user.id },
{ Name: 'name', Value: user.name },
{ Name: 'email', Value: user.email },
{ Name: 'updated_at', Value: Math.floor(user.updatedTime / 1000).toString() },
...user.attributes.map((attr) => ({ Name: attr.name, Value: attr.value })),
...(user.kind === 'cognito'
? [{ Name: 'email_verified', Value: isEmailVerified(user) ? 'true' : 'false' }]
: []),
: [{ Name: 'name', Value: user.name }]),
];
};

Expand Down

0 comments on commit b4e3822

Please sign in to comment.