diff --git a/frontend/frontend/src/api/user.js b/frontend/frontend/src/api/user.js index f89585e7..1d336535 100644 --- a/frontend/frontend/src/api/user.js +++ b/frontend/frontend/src/api/user.js @@ -1,8 +1,6 @@ import axios from 'axios'; import { HOST } from '../constants'; -import { logout } from '../redux/actions/userActions'; -import { useDispatch } from 'react-redux'; const authenticate = async (code, privateAccess, userKey) => { try { @@ -23,15 +21,11 @@ const authenticate = async (code, privateAccess, userKey) => { }; const getUserMetadata = async (userKey) => { - const dispatch = useDispatch(); try { const fullUrl = `https://${HOST}/api/user-access?user_key=${userKey}`; const result = await axios.get(fullUrl); return result.data; } catch (error) { - if (error.response && error.response.status === 404) { - dispatch(logout(userKey)); - } console.error(error); return null; }