Skip to content
Snippets Groups Projects
Commit db53f140 authored by Emil's avatar Emil
Browse files

fix: logout api error

parent 4d9b3708
No related branches found
No related tags found
No related merge requests found
Pipeline #41357 failed
......@@ -41,8 +41,8 @@ export const getUserData = () => async (dispatch: AppDispatch) => {
}
export const logoutUser = () => async (dispatch: AppDispatch) => {
localStorage.removeItem('token')
await axios.post('/auth/logout').then(() => {
localStorage.removeItem('token')
delete axios.defaults.headers.common['Authorization']
dispatch({
type: Types.SET_UNAUTHENTICATED,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment