Skip to content

Commit 1176d68

Browse files
committed
fixed a bug with including the relationshipTitle in the email
1 parent a0a016e commit 1176d68

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/routes/contact.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,13 @@ router.post('/send', async (req, res) => {
190190
if (contact.email !== null) {
191191
// short-lived temporary token that only lasts one hour
192192
const temporaryToken = await utils.getToken(contact.id, contact.email[0].address, 'contact')
193-
194193
emails.push({
195194
email: contact.email[0].address,
196195
name: contact.name,
197196
entityName: entity.name,
198197
entityId: entity.id,
199198
entityType: entity.type,
200-
relationshipTitle: entity.entityContacts.relationshipTitle.relationshipTitle,
199+
relationshipTitle: entity.entityContacts.dataValues.relationshipTitle,
201200
token: temporaryToken
202201
})
203202
}

0 commit comments

Comments
 (0)