diff --git a/src/utils/bypass/masters.js b/src/utils/bypass/masters.js index 7840e1bbb..cbc31f880 100644 --- a/src/utils/bypass/masters.js +++ b/src/utils/bypass/masters.js @@ -115,7 +115,7 @@ class MastersService { if (status) { await contacts.add.call(this.service, { contact: { type: 'email', value: userProfile.email }, - userId: data.id, + userId: data.user.id, }); return data; } diff --git a/src/utils/bypass/pump-jack.js b/src/utils/bypass/pump-jack.js index de53c9799..6d56a6c64 100644 --- a/src/utils/bypass/pump-jack.js +++ b/src/utils/bypass/pump-jack.js @@ -64,7 +64,7 @@ class PumpJackService { ); if (registeredUser) { - await contacts.add.call(this.service, { contact: { type: 'phone', value: userProfile.phone }, userId: registeredUser.id }); + await contacts.add.call(this.service, { contact: { type: 'phone', value: userProfile.phone }, userId: registeredUser.user.id }); return registeredUser; } diff --git a/src/utils/contacts.js b/src/utils/contacts.js index 98d958c0e..c840ba8de 100644 --- a/src/utils/contacts.js +++ b/src/utils/contacts.js @@ -34,6 +34,8 @@ async function checkLimit({ userId }) { } async function add({ userId, contact }) { + this.log.debug({ userId, contact }, 'add contact key params'); + const { redis } = this; const contactsCount = await checkLimit.call(this, { userId }); const lock = await this.dlock.once(lockContact(contact.value));