From 024e98a23e15e4779d5b218d1d57966bd9aa3933 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Thu, 2 Apr 2020 11:30:13 -0700 Subject: [PATCH] inv --- api/hub.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/hub.ts b/api/hub.ts index c3c0d92..5faf43d 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -34,7 +34,6 @@ const checkInviteHub = async (params = {}) => { const invite = object.invite const pubkey = object.pubkey const price = object.price - const invoice = object.invoice const dbInvite = await models.Invite.findOne({ where: { inviteString: invite.pin }}) const contact = await models.Contact.findOne({ where: { id: dbInvite.contactId } }) @@ -43,7 +42,7 @@ const checkInviteHub = async (params = {}) => { console.log('existing status: ',dbInvite.status) if (dbInvite.status != invite.invite_status) { const updateObj:{[k:string]:any} = { status: invite.invite_status, price: price } - if(invoice) updateObj.invoice = invoice + if(invite.invoice) updateObj.invoice = invite.invoice console.log('update invite!', updateObj) dbInvite.update(updateObj)