FIX_PRE_ENROLLMENT_LOGIN_ISSUE : RV
This commit is contained in:
parent
407482cbd3
commit
913a8b6574
@ -99,7 +99,7 @@ class RestAuthenticationController extends AdminController
|
||||
return $this->callThirdPartyAPI($this->request->getJSON(),'verifyEmployeeNumber');
|
||||
|
||||
// $result = ['user_verification' => false , 'message' => "User not found"];
|
||||
// return $this->respond(['status' => 'failed','code' => 404,'data' => $result, 'post_enrollment'=> $apiResponse],200);
|
||||
// return $this->respond(['status' => 'failed','code' => 404,'data' => $result, 'post_enrollment'=> json_decode($apiResponse, true)],200);
|
||||
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
@ -163,7 +163,7 @@ class RestAuthenticationController extends AdminController
|
||||
return $this->callThirdPartyAPI($this->request->getJSON(),'verifyEmployeeEmailId');
|
||||
|
||||
// $result = ['user_verification' => false , 'message' => "User not found"];
|
||||
// return $this->respond(['status' => 'failed','code' => 404,'data' => $result, 'post_enrollment'=> $apiResponse],200);
|
||||
// return $this->respond(['status' => 'failed','code' => 404,'data' => $result, 'post_enrollment'=> json_decode($apiResponse, true)],200);
|
||||
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
@ -217,13 +217,13 @@ class RestAuthenticationController extends AdminController
|
||||
|
||||
// Call the third-party API function
|
||||
$apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'getVerifiedUserData');
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result , 'post_enrollment'=> $apiResponse],200);
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result , 'post_enrollment'=> json_decode($apiResponse, true)],200);
|
||||
|
||||
} else {
|
||||
|
||||
// Call the third-party API function
|
||||
$apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'getVerifiedUserData');
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP" , 'post_enrollment'=> $apiResponse],200);
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP" , 'post_enrollment'=> json_decode($apiResponse, true)],200);
|
||||
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@ -426,11 +426,11 @@ class RestAuthenticationController extends AdminController
|
||||
$result = JWTToken::encode($employeeData);
|
||||
// Call the third-party API function
|
||||
$apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'verifyMpin');
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result , 'post_enrollment'=> $apiResponse],200);
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result , 'post_enrollment'=> json_decode($apiResponse, true)],200);
|
||||
} else {
|
||||
// Call the third-party API function
|
||||
$apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'getVerifiedUserData');
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP", 'post_enrollment'=> $apiResponse],200);
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP", 'post_enrollment'=> json_decode($apiResponse, true)],200);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user