fixed typo error

This commit is contained in:
ashutosh.nehete 2025-06-07 15:35:31 +05:30
parent d235bc8211
commit e760d51987

View File

@ -559,9 +559,9 @@ namespace MarcoBMS.Services.Controllers
{ {
// Validate input // Validate input
if (string.IsNullOrWhiteSpace(verifyOTP.Email) || if (string.IsNullOrWhiteSpace(verifyOTP.Email) ||
string.IsNullOrWhiteSpace(verifyOTP.OPT) || string.IsNullOrWhiteSpace(verifyOTP.OTP) ||
verifyOTP.OPT.Length != 4 || verifyOTP.OTP.Length != 4 ||
!verifyOTP.OPT.All(char.IsDigit)) !verifyOTP.OTP.All(char.IsDigit))
{ {
_logger.LogWarning("OTP login failed - invalid input provided"); _logger.LogWarning("OTP login failed - invalid input provided");
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid input", "Please provide a valid 4-digit OTP and Email", 400)); return BadRequest(ApiResponse<object>.ErrorResponse("Invalid input", "Please provide a valid 4-digit OTP and Email", 400));
@ -601,7 +601,7 @@ namespace MarcoBMS.Services.Controllers
} }
// Match OTP // Match OTP
if (otpDetails.OTP != verifyOTP.OPT) if (otpDetails.OTP != verifyOTP.OTP)
{ {
_logger.LogWarning("OTP login failed - incorrect OTP entered for user {UserId}", userId); _logger.LogWarning("OTP login failed - incorrect OTP entered for user {UserId}", userId);
return Unauthorized(ApiResponse<object>.ErrorResponse("Invalid OTP", "OTP did not match", 401)); return Unauthorized(ApiResponse<object>.ErrorResponse("Invalid OTP", "OTP did not match", 401));