Adding support for AfterFind (#2968)

This commit is contained in:
jb
2016-11-12 09:35:34 -08:00
committed by Florent Vilmart
parent b80d8a0d3d
commit 19271fa1ef
4 changed files with 202 additions and 2 deletions

View File

@@ -50,6 +50,11 @@ ParseCloud.beforeFind = function(parseClass, handler) {
triggers.addTrigger(triggers.Types.beforeFind, className, handler, Parse.applicationId);
};
ParseCloud.afterFind = function(parseClass, handler) {
const className = getClassName(parseClass);
triggers.addTrigger(triggers.Types.afterFind, className, handler, Parse.applicationId);
};
ParseCloud._removeAllHooks = () => {
triggers._unregisterAll();
}