meteor-collection-hooks
meteor-collection-hooks copied to clipboard
What would make .before.insert not fire?
I have this hook defined:
DealsCollection.before.insert(function (userId, doc) {
console.log(doc);
if (doc.priceDetails.startDate) {
doc.priceDetails.startDateUTC = Meteor.call("makeUtcDate", doc.priceDetails.startDate);
}
});
It never fires. I have DealsCollection.after.insert
that fires just fine. Looking for ideas. Thanks.
It seems I can't do Meteor.call
from inside the hook?