Browse Source

Обновить 'front/src/actions/user.js'

1 changed files with 1 additions and 15 deletions
  1. 1 15
      front/src/actions/user.js

+ 1 - 15
front/src/actions/user.js

@@ -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')
-//         }
-//     }
-// }
+}