wangfei 6 lat temu
rodzic
commit
23075ab12f
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2
    2
      src/util/ajax.js

+ 2
- 2
src/util/ajax.js Wyświetl plik

5
 
5
 
6
 const token = function (headers) {
6
 const token = function (headers) {
7
   let JWT
7
   let JWT
8
-  if (headers){
8
+  if (headers) {
9
     localStorage.setItem('JWT', headers.authorization)
9
     localStorage.setItem('JWT', headers.authorization)
10
     JWT = headers.authorization
10
     JWT = headers.authorization
11
   }
11
   }
12
   console.log(JWT)
12
   console.log(JWT)
13
-  return JWT ? JWT : localStorage.getItem('JWT')
13
+  return JWT ? JWT : localStorage.getItem('JWT') // eslint-disable-line
14
 }
14
 }
15
 
15
 
16
 const Axios = axios.create({
16
 const Axios = axios.create({