From 2666f8581b0e680bf6554fc5bcf490a9aecb4e3b Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 11 Nov 2025 15:17:30 +0530 Subject: [PATCH] FIX_CHANGE_PASS_API --- app/Controllers/RestAuthenticationController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 9d68b2d..e12a157 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -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) {