Created
September 24, 2018 07:13
-
-
Save dejanvasic85/144df5e5d5f73638d9a3346791c9f376 to your computer and use it in GitHub Desktop.
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
| export function* request(apiCall) { | |
| const response = yield apiCall | |
| if (response.status === 401) { | |
| yield put(SessionActions.logout()) | |
| return null | |
| } | |
| return response | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment