From 5a3a8a81a4decc1a7430c64f8793d842b7fc80bc Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Wed, 11 Feb 2026 12:23:39 +0530 Subject: [PATCH] 429 issue : GWM --- app/Controllers/RestAuthenticationController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 89ec1de..b15d191 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -171,7 +171,7 @@ class RestAuthenticationController extends AdminController //check the resend otp (with in 60 seconds don't allow another otp to send) $check = canSendOtp($employeeData); if (!$check['allowed']) { - return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after'] ])->setStatusCode(429); // Too Many Requests + return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after']], 429); // Too Many Requests } $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - verifyEmployeeWithMobileNumber: Employee verified with ID = " . $employeeData['employee_id']); @@ -338,7 +338,7 @@ class RestAuthenticationController extends AdminController //check the resend otp (with in 60 seconds don't allow another otp to send) $check = canSendOtp($employeeData); if (!$check['allowed']) { - return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after'] ])->setStatusCode(429); // Too Many Requests + return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after']], 429); // Too Many Requests } $this->myLogger->logme("error", "REST-AUTH-CONTROLLER - verifyEmployeeWithEmailId: Valid employee found, generating OTP"); @@ -597,7 +597,7 @@ class RestAuthenticationController extends AdminController //check the resend otp (with in 60 seconds don't allow another otp to send) $check = canSendOtp($HrData); if (!$check['allowed']) { - return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after'] ])->setStatusCode(429); // Too Many Requests + return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after']], 429); // Too Many Requests } $sql = "UPDATE level_contacts SET otp = ? WHERE mobile = ? AND contact_type = 'client' AND is_active = 1"; @@ -662,7 +662,7 @@ class RestAuthenticationController extends AdminController //check the resend otp (with in 60 seconds don't allow another otp to send) $check = canSendOtp($HrData); if (!$check['allowed']) { - return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after'] ])->setStatusCode(429); // Too Many Requests + return $this->respond(['status' => false,'message' => 'OTP already sent. Please wait before retrying.','retry_after_seconds' => $check['retry_after']], 429); // Too Many Requests }