Skip to content

Commit

Permalink
fix: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DaKingKong committed Sep 2, 2024
1 parent 37ea16f commit e394406
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,12 @@ app.get('/contact', async function (req, res) {
platformName = platform;
const { successful, returnMessage, contact } = await contactCore.findContact({ platform, userId, phoneNumber: req.query.phoneNumber, overridingFormat: req.query.overridingFormat });
res.status(200).send({ successful, returnMessage, contact });
const nonNewContact = contact.filter(c => !c.isNewContact);
resultCount = nonNewContact.length;
success = true;
if(successful)
{
const nonNewContact = contact.filter(c => !c.isNewContact);
resultCount = nonNewContact.length;
success = true;
}
}
else {
res.status(400).send('Please go to Settings and authorize CRM platform');
Expand Down

0 comments on commit e394406

Please sign in to comment.