Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,5 @@ cdk.context.json

packages/cognito-custom-mail-lambda/**/*.html

.tmp
.tmp
.vs
12 changes: 6 additions & 6 deletions packages/cognito-custom-mail-lambda/src/mailer/custom-mailer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ const getConfirmRegistrationUrl = async (emailAddress: string) => {
return confirmRegistrationUrl
}
const user: UserModel = await res.json()
if (user.products.length === 1) {
const productId = user.products[0].id

if (user.products.length > 0) {
const productId = (user.products[0].id || '').toLowerCase()
if (productId === 'agentbox') return agentboxUrl
if (productId === 'agentpoint') return agentpointUrl
if (productId === 'consoleCloud') return consoleUrl
if (productId === 'ireWeb') return ireUrl
if (productId === 'mmiWeb') return mmiUrl
if (productId === 'consolecloud') return consoleUrl
if (productId === 'ireweb') return ireUrl
if (productId === 'mmiweb') return mmiUrl
}

return confirmRegistrationUrl
}

Expand Down