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
// send updated owner info to others
const contactIds = await models.Contact.findAll({
where:{deleted:false,fromGroup:false}
}).map(c => c.id)
const contactIds = await models.Contact.findAll({where:{deleted:false}})
.filter(c=> !c.fromGroup).map(c=> c.id)
console.log('contactIds',contactIds)
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)
return;
// send updated owner info to others
const contactIds = yield models_1.models.Contact.findAll({
where: { deleted: false, fromGroup: false }
}).map(c => c.id);
const contactIds = yield models_1.models.Contact.findAll({ where: { deleted: false } })
.filter(c => !c.fromGroup).map(c => c.id);
console.log('contactIds', contactIds);
if (contactIds.length == 0)
return;

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

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