Browse Source

fix filter

hosting-provider
Evan Feenstra 5 years ago
parent
commit
31e799b15b
  1. 5
      api/controllers/contacts.ts
  2. 5
      dist/api/controllers/contacts.js
  3. 2
      dist/api/controllers/contacts.js.map

5
api/controllers/contacts.ts

@ -88,9 +88,8 @@ const updateContact = async (req, res) => {
if (!shouldSendUpdatedSelf) return if (!shouldSendUpdatedSelf) return
// send updated owner info to others // send updated owner info to others
const contactIds = await models.Contact.findAll({ const contactIds = await models.Contact.findAll({where:{deleted:false}})
where:{deleted:false,fromGroup:false} .filter(c=> !c.fromGroup).map(c=> c.id)
}).map(c => c.id)
console.log('contactIds',contactIds) console.log('contactIds',contactIds)
if (contactIds.length == 0) return if (contactIds.length == 0) return

5
dist/api/controllers/contacts.js

@ -81,9 +81,8 @@ const updateContact = (req, res) => __awaiter(void 0, void 0, void 0, function*
if (!shouldSendUpdatedSelf) if (!shouldSendUpdatedSelf)
return; return;
// send updated owner info to others // send updated owner info to others
const contactIds = yield models_1.models.Contact.findAll({ const contactIds = yield models_1.models.Contact.findAll({ where: { deleted: false } })
where: { deleted: false, fromGroup: false } .filter(c => !c.fromGroup).map(c => c.id);
}).map(c => c.id);
console.log('contactIds', contactIds); console.log('contactIds', contactIds);
if (contactIds.length == 0) if (contactIds.length == 0)
return; return;

2
dist/api/controllers/contacts.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save