token valid fix

This commit is contained in:
Priyatham Sai Chand 2021-03-25 14:42:43 +05:30
parent eab409b182
commit 8819e41a80
1 changed files with 2 additions and 2 deletions

View File

@ -24,13 +24,13 @@ export default function App() {
token ="";
}
const tokenRes = await Axios.post(
"http://localhost:5000/users/tokenIsValid",
"https://server-locaft.herokuapp.com/users/tokenIsValid",
null,
{headers: {"x-auth-token": token }}
);
if (tokenRes.data) {
const userRes = await Axios.get("http://localhost:5000/users/",
const userRes = await Axios.get("https://server-locaft.herokuapp.com/users/",
{headers:{"x-auth-token":token},
});
setUserData({