FIX_CHANGE_PASS_API

This commit is contained in:
VENKATESHWARAN 2025-11-11 15:17:30 +05:30
parent 3d0eeb8ce2
commit 2666f8581b

View File

@ -1584,9 +1584,9 @@ class RestAuthenticationController extends AdminController
// Call the third-party API function
$this->callThirdPartyAPI($payload, 'changePassword');
return $this->respond(['status' => 'success','code' => 200,'message' => 'Password changed successfully' ], 200);
return $this->respond(['status' => 'success','code' => 200,'message' => 'Password changed successfully' ], 200);
} else {
return $this->respond(['status' => 'failed','code' => 500,'message' => 'Failed to update password'], 500);
return $this->respond(['status' => 'failed','code' => 500,'message' => 'Failed to update password'], 500);
}
}else{
@ -1594,8 +1594,7 @@ class RestAuthenticationController extends AdminController
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - changePassword: Employee not verified - calling third-party API fallback to get the POST employee data");
// Call the third-party API function
$apiResponse = $this->callThirdPartyAPI($payload, 'changePassword');
return $this->respond(['status' => 'failed', 'code' => 404, 'data' => "", 'post_enrollment' => json_decode($apiResponse, true)], 200);
return $this->callThirdPartyAPI($payload, 'changePassword');
}
} catch (\Throwable $th) {