update report no date check session
This commit is contained in:
@ -57,30 +57,29 @@ const TheContent = () => {
|
||||
}
|
||||
|
||||
async function fetchUser() {
|
||||
return true;
|
||||
// if(SsoSession.attributes[0] === undefined) {
|
||||
// return false;
|
||||
// }
|
||||
// const user_email = SsoSession.attributes[0].values[0]
|
||||
// //console.log(user_email);
|
||||
// const company_code = "FBS";
|
||||
// const key = "api"
|
||||
// const pwd = "c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8";
|
||||
if(SsoSession.attributes[0] === undefined) {
|
||||
return false;
|
||||
}
|
||||
const user_email = SsoSession.attributes[0].values[0]
|
||||
//console.log(user_email);
|
||||
const company_code = "FBS";
|
||||
const key = "api"
|
||||
const pwd = "c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8";
|
||||
|
||||
// const result = await axios.get('https://fsbsso.sumasen.net/users?email=' + user_email, {
|
||||
// auth: {
|
||||
// username: key,
|
||||
// password: pwd
|
||||
// }
|
||||
// }).catch((err) => {
|
||||
// console.log(err);
|
||||
// return false;
|
||||
// });
|
||||
// //console.log(result.data);
|
||||
// if(JSON.stringify(UserData) !== JSON.stringify(result.data[0])) {
|
||||
// setUserData(result.data[0]);
|
||||
// }
|
||||
// return true;
|
||||
const result = await axios.get('https://fsbsso.sumasen.net/users?email=' + user_email, {
|
||||
auth: {
|
||||
username: key,
|
||||
password: pwd
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
//console.log(result.data);
|
||||
if(JSON.stringify(UserData) !== JSON.stringify(result.data[0])) {
|
||||
setUserData(result.data[0]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function isCSVPath(){
|
||||
|
||||
Reference in New Issue
Block a user