TEMP_FIX_REST_CONTROLLER
This commit is contained in:
parent
c067bf6aed
commit
eb0e0bc7d9
@ -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");
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user