Closed thebarty closed 7 years ago
Absolutely:
Posts.update(_id, {
$set: {
title: 'test'
}
}, {myOption: false});
And then:
this.collection.before.update((userId, doc, fieldNames, modifier, opts) => {
if( opts.myOption ) {
...
}
});
I think it's not possible with insert
or remove
though (for now?).
@nicooprat's answer is correct, and the reason insert
and remove
doesn't accept options is because the original api doesn't have options as arguments.
Hi guys,
Is it possible to pass parameter from update to collectionHook?
This would be really handy for my useCase. Something like this:
Is there any chance to do this?