You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2018. It is now read-only.
I want to be able to return a promise from a hook. Promise return values should not be used so that we can do things like:
userService.before({remove: function(hook){// Delete the user from intercom.io firstreturnQ.ninvoke(intercom,'deleteUser',{user_id: hook.id});}});
If you want to modify hook data, just change it after .then:
userService.before({remove: function(hook){// Delete the user from intercom.io firstreturnQ.ninvoke(intercom,'deleteUser',{user_id: hook.id}).then(function(user){hook.id=user.id;});}});
Errors in the promise will be treated as actual errors.
The text was updated successfully, but these errors were encountered:
I want to be able to return a promise from a hook. Promise return values should not be used so that we can do things like:
If you want to modify hook data, just change it after
.then
:Errors in the promise will be treated as actual errors.
The text was updated successfully, but these errors were encountered: