add access token
This commit is contained in:
@@ -12,6 +12,7 @@ import swal from 'sweetalert';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import Switch from "react-switch";
|
||||
import Select from "react-select";
|
||||
import Store from '../../store';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
const initialDataPost = {
|
||||
@@ -86,7 +87,7 @@ export default function User() {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
// 'Authorization': token,
|
||||
'Authorization': Store.getState().isLogin.access_token,
|
||||
},
|
||||
})
|
||||
if (result.data.status === 10000) {
|
||||
@@ -137,7 +138,7 @@ export default function User() {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
// 'Authorization': token
|
||||
'Authorization': Store.getState().isLogin.access_token,
|
||||
},
|
||||
data: data ? data : dataPost,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user