Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cedac82335
@ -453,7 +453,7 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
||||
|
||||
// $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount");
|
||||
// $routes->post("employeeRest/calculatePremium", "EmployeeRestController::calculatePremium");
|
||||
|
||||
// $routes->post("updateMpin", "RestAuthenticationController::updateMpin");
|
||||
$routes->group("employeeRest", ['filter' => ['appSignature' , 'authJWT'] ], function ($routes) {
|
||||
|
||||
$routes->post('logout', 'RestAuthenticationController::logout');
|
||||
|
||||
@ -978,6 +978,12 @@ class RestAuthenticationController extends AdminController
|
||||
$old_mpin = $this->request->getJSON()->old_mpin;
|
||||
$mpin = $this->request->getJSON()->new_mpin;
|
||||
|
||||
if($old_mpin == $mpin)
|
||||
{
|
||||
$result = ['mpin_verification' => false , 'message' => "New MPIN must be different from the old MPIN"];
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200);
|
||||
}
|
||||
|
||||
$empdata = RestAuthHelper::getPreAndPostDataByEmailOrMobile(['email_id' => $email_id, 'mobile_number' => $mobile_number, 'old_mpin' => $old_mpin ]);
|
||||
// print_r($empdata); die;
|
||||
|
||||
@ -986,7 +992,7 @@ class RestAuthenticationController extends AdminController
|
||||
log_message('error', ' ');
|
||||
log_message('error', '************************ PRE END ********************************');
|
||||
|
||||
$result = ['user_verification' => false , 'message' => "User not found"];
|
||||
$result = ['mpin_verification' => false , 'message' => "Old MPIN is incorrect"];
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user