diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 836cc7c..15a0e52 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -449,7 +449,7 @@ $routes->post("employeeRest/updateMpin", "RestAuthenticationController::updateMp $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) { - $routes->post("getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData"); + // $routes->post("getVerifiedUserData", "RestAuthenticationController::getVerifiedUserData"); $routes->post("storeFireBase", "EmployeeRestController::storeFireBase"); // $routes->post("updateMpin", "RestAuthenticationController::updateMpin"); diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 95ba5d5..577f0b9 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -440,10 +440,18 @@ class RestAuthenticationController extends AdminController $apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'verifyMpin'); 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'=> json_decode($apiResponse, true)],200); - } + + $apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'/employeeRest/verifyMpin'); + + return $this->respond(['status' => 'success','code' => 200 , 'post_enrollment'=> json_decode($apiResponse, true)],200); + + //$apiResponse = $this->callThirdPartyAPI($this->request->getJSON(),'/getVerifiedUserData'); + + // 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); }