Clear token before dispatching logout action

This commit is contained in:
Chi Vinh Le
2017-05-16 17:13:19 +07:00
parent 084bd6710f
commit 81f51b69ec
+1 -1
View File
@@ -267,8 +267,8 @@ export const fetchForgotPassword = (email) => (dispatch) => {
export const logout = () => (dispatch) => {
return coralApi('/auth', {method: 'DELETE'}).then(() => {
dispatch({type: actions.LOGOUT});
Storage.removeItem('token');
dispatch({type: actions.LOGOUT});
});
};