mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 20:08:37 +08:00
Clear token before dispatching logout action
This commit is contained in:
@@ -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});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user