Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks
https://atmospherejs.com/matb33/collection-hooks
MIT License
657 stars 92 forks source link

Generic entry point "{before/after}.save" "{before/after}.load" #189

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi Question: would it be possible to have generic entry point to save and load ?

For instance I want to do some post processing, whatever I insert/updated/upsert.

Or do you consider it's useless, and I just bind all what I need even if that's redundant ?

Regards

ghost commented 8 years ago

Potentially rejected as duplicate of https://github.com/matb33/meteor-collection-hooks/issues/52

ghost commented 8 years ago

Also I didnt know that

Note that calling upsert will always fire .before.upsert hooks, but will call either .after.insert or .after.update hooks depending on the outcome of the upsert operation.

So I guess it's only two lines...

matb33 commented 8 years ago

Will close as duplicate of #52