Created
June 2, 2020 18:20
-
-
Save behnamazimi/245e6b60d1ed5ca574c70b4417f54ced to your computer and use it in GitHub Desktop.
ServiceWrapper.setHook.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServiceWrapper | |
// get result and return the data property | |
.setHook(HOOKS.BEFORE_RESOLVE, res => res.data) | |
// this method will call on all successes. | |
.setHook(HOOKS.AFTER_SUCCESS, res => { | |
console.log(res); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment