|
@@ -32,18 +32,4 @@ export const auth = () => {
|
|
|
localStorage.removeItem('token')
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-// export const auth = () => {
|
|
|
-// return async dispatch => {
|
|
|
-// try {
|
|
|
-// const response = await axios.get(`http://localhost:5000/api/auth/auth`,
|
|
|
-// {headers:{Authorization:`Bearer ${localStorage.getItem('token')}`}}
|
|
|
-// )
|
|
|
-// dispatch(setUser(response.data.user))
|
|
|
-// localStorage.setItem('token', response.data.token)
|
|
|
-// } catch (e) {
|
|
|
-// alert(e.response.data.message)
|
|
|
-// localStorage.removeItem('token')
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+}
|