From 6ab9372bfe2e91aa4c98a15ee3c99c3a32ee46a5 Mon Sep 17 00:00:00 2001 From: Maxence Bouret Date: Thu, 12 Jul 2018 16:58:46 +0200 Subject: [PATCH] Update api.js --- client/src/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/api.js b/client/src/api.js index ea9833b..8b7f65d 100644 --- a/client/src/api.js +++ b/client/src/api.js @@ -64,7 +64,7 @@ export default { const userData = localStorage.getItem('user'); if (!userData) return false; const user = JSON.parse(userData); - if (user.token && user.name) { + if (user.token) { axios.defaults.headers.common['Authorization'] = 'Bearer ' + user.token; return user; }