added user csv data
This commit is contained in:
@ -30,8 +30,6 @@ const TheContent = () => {
|
||||
const [SsoSession, setSsoSession] = useState('');
|
||||
const [UserData, setUserData] = useState('');
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
async function fetchSession() {
|
||||
|
||||
// You can await here
|
||||
@ -65,8 +63,6 @@ const TheContent = () => {
|
||||
const key = "api"
|
||||
const pwd = "c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8";
|
||||
|
||||
console.log("making request");
|
||||
|
||||
const result = await axios.get('https://fsbsso.sumasen.net/users?email=akira.miyata@mobilous.com', {
|
||||
auth: {
|
||||
username: key,
|
||||
@ -83,6 +79,11 @@ const TheContent = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
const usePathname = () => {
|
||||
const location = useLocation();
|
||||
return location.pathname;
|
||||
}
|
||||
|
||||
function get_token_from_storage_or_cookie() {
|
||||
|
||||
const cookies = new Cookies();
|
||||
@ -98,10 +99,9 @@ const TheContent = () => {
|
||||
const _empcode = UserData.employee_code;
|
||||
const json_str = '[{"firstname": "' + _firstname + '", "lastname":"' +_lastname+ '", "email":" ' + _email + '", "empcode": "' + _empcode + '"}]';
|
||||
if(_empcode !== null && _empcode !== undefined){
|
||||
console.log(location.pathname);
|
||||
console.log(usePathname);
|
||||
postUserData(json_str);
|
||||
}
|
||||
console.log(json_str);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user