This commit is contained in:
dev-chiefworks
2022-04-18 20:16:42 -04:00
parent 3073674d86
commit e8d48bfff4
+21 -21
View File
@@ -223,30 +223,30 @@ private function testCards(){
log_message('critical', "API-WAS CALLED user 10-009=>".$endpoint );
//{"username":"ses66181@gmail.com","password":"12345678","sessionid":"DUMMYSESSION","loc":"172.24.0.1","pid":100}
if ($inx['username'] == 'ses66181@gmail.com'){
$res= $this->dummy_data();
if ($inx['username'] == 'ses66181@gmail.com'){
// $res= $this->dummy_data();
}
else{
$resLogin = FloatLogin::floatLoginUser($inx['username'], $inx['password']);
log_message('critical', "Login Returned=>".$endpoint );
$this->logArray($resLogin);
$resLoginArray = json_decode($resLogin, true);
$this->logArray($resLoginArray);
log_message('critical', "Ready for Profile=>".$resLoginArray['accessToken'] );
if (!empty($resLoginArray) && is_array($resLoginArray)){
if (isset($resLoginArray['accessToken'])){
$resProfile = UserProfile::floatUserProfile($resLoginArray['accessToken']);
$this->logArray($resProfile);
$res = json_decode($resProfile, true);
$this->logArray($res);
}
}
else{
log_message('critical', "Login Failed for User=>".$inx['username'] );
$res["internal_return"] = "0";
}
}
}
$resLogin = FloatLogin::floatLoginUser($inx['username'], $inx['password']);
log_message('critical', "Login Returned=>".$endpoint );
$this->logArray($resLogin);
$resLoginArray = json_decode($resLogin, true);
$this->logArray($resLoginArray);
log_message('critical', "Ready for Profile=>".$resLoginArray['accessToken'] );
if (!empty($resLoginArray) && is_array($resLoginArray)){
if (isset($resLoginArray['accessToken'])){
$resProfile = UserProfile::floatUserProfile($resLoginArray['accessToken']);
$this->logArray($resProfile);
$res = json_decode($resProfile, true);
$this->logArray($res);
}
}
else{
log_message('critical', "Login Failed for User=>".$inx['username'] );
$res["internal_return"] = "0";
}
break;
case 'updateprofile': $in["action"] = SAVVYEXT_USER_PROFILE;