meteor-collection-softremovable icon indicating copy to clipboard operation
meteor-collection-softremovable copied to clipboard

Before/after hooks

Open zimme opened this issue 10 years ago • 5 comments

Look into adding before/after hooks for softRemove and restore.

zimme avatar Jul 01 '15 13:07 zimme

+1

serkandurusoy avatar Aug 02 '15 20:08 serkandurusoy

+1

scmorse avatar Oct 01 '15 16:10 scmorse

As a temporary solution, something like this works for an afterSoftRemoved hook:

YourCollection.after.update(function (userId, document, fieldNames, modifier, options) {
    if (modifier && modifier.$set && modifier.$set.removed) {
      // do something
      afterSoftRemoved();
    }
    ...
});

scmorse avatar Oct 01 '15 17:10 scmorse

+1

zhaoyao91 avatar Nov 01 '15 04:11 zhaoyao91

After update hook is not firing!

Tolsee avatar Mar 08 '18 05:03 Tolsee