(20250303) Removed print stmt.
This commit is contained in:
@@ -360,7 +360,6 @@ async def verify_otp(
|
|||||||
if phone_no.startswith("254"): phone_no = phone_no[3:]
|
if phone_no.startswith("254"): phone_no = phone_no[3:]
|
||||||
if phone_no.startswith("0"): phone_no = phone_no[1:]
|
if phone_no.startswith("0"): phone_no = phone_no[1:]
|
||||||
phone_no = "+254" + phone_no
|
phone_no = "+254" + phone_no
|
||||||
print("CLEANED PHONE NO.:", phone_no)
|
|
||||||
|
|
||||||
# hit Omkar's API:
|
# hit Omkar's API:
|
||||||
api_response = await current_app.http_client.post(
|
api_response = await current_app.http_client.post(
|
||||||
@@ -391,12 +390,9 @@ async def verify_otp(
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
success = api_response.is_success
|
success = api_response.is_success
|
||||||
print("ADD CLIENT WITH NOTES CODE:", api_response.status_code)
|
|
||||||
print("ADD CLIENT WITH NOTES JSON:", api_response.json())
|
|
||||||
return ResponseModel(
|
return ResponseModel(
|
||||||
status_code = StatusCodes.OK if success else StatusCodes.FAILED,
|
status_code = StatusCodes.OK if success else StatusCodes.FAILED,
|
||||||
http_code = HttpCodes.SUCCESS if success else HttpCodes.UNAUTHORIZED,
|
http_code = HttpCodes.SUCCESS if success else HttpCodes.UNAUTHORIZED,
|
||||||
message = api_response.json().get("message", "N/A")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ class TimedOTPController:
|
|||||||
|
|
||||||
# Generate the OTP:
|
# Generate the OTP:
|
||||||
otp_key = self.KEY_PREFIX + redis_cache.make_key(str(inbound_data.id))
|
otp_key = self.KEY_PREFIX + redis_cache.make_key(str(inbound_data.id))
|
||||||
print("GENERATE KEY:", otp_key)
|
|
||||||
otp_client = HashedOTP(secret = HashedOTP.generate_secret())
|
otp_client = HashedOTP(secret = HashedOTP.generate_secret())
|
||||||
otp = otp_client.generate_otp(count = 0)
|
otp = otp_client.generate_otp(count = 0)
|
||||||
|
|
||||||
@@ -208,7 +207,6 @@ class TimedOTPController:
|
|||||||
|
|
||||||
# Fetch the OTP from Redis:
|
# Fetch the OTP from Redis:
|
||||||
otp_key = self.KEY_PREFIX + redis_cache.make_key(str(inbound_data.id))
|
otp_key = self.KEY_PREFIX + redis_cache.make_key(str(inbound_data.id))
|
||||||
print("VERIFY KEY:", otp_key)
|
|
||||||
stored_otp = await redis_cache.get(key = otp_key)
|
stored_otp = await redis_cache.get(key = otp_key)
|
||||||
if not stored_otp:
|
if not stored_otp:
|
||||||
response.message = "No OTP found for this request. It may have expired."
|
response.message = "No OTP found for this request. It may have expired."
|
||||||
|
|||||||
Reference in New Issue
Block a user