mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +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) => {
|
export const logout = () => (dispatch) => {
|
||||||
return coralApi('/auth', {method: 'DELETE'}).then(() => {
|
return coralApi('/auth', {method: 'DELETE'}).then(() => {
|
||||||
dispatch({type: actions.LOGOUT});
|
|
||||||
Storage.removeItem('token');
|
Storage.removeItem('token');
|
||||||
|
dispatch({type: actions.LOGOUT});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user