TEMP_FIX_REST_CONTROLLER

This commit is contained in:
Srinivas-Saravanan 2025-03-29 16:16:18 +05:30
parent c067bf6aed
commit eb0e0bc7d9
2 changed files with 12 additions and 4 deletions

View File

@ -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");

View File

@ -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);
}