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
if (string.IsNullOrWhiteSpace(verifyOTP.Email) ||
string.IsNullOrWhiteSpace(verifyOTP.OPT) ||
verifyOTP.OPT.Length != 4 ||
!verifyOTP.OPT.All(char.IsDigit))
string.IsNullOrWhiteSpace(verifyOTP.OTP) ||
verifyOTP.OTP.Length != 4 ||
!verifyOTP.OTP.All(char.IsDigit))
{
_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));
@ -601,7 +601,7 @@ namespace MarcoBMS.Services.Controllers
}
// Match OTP
if (otpDetails.OTP != verifyOTP.OPT)
if (otpDetails.OTP != verifyOTP.OTP)
{
_logger.LogWarning("OTP login failed - incorrect OTP entered for user {UserId}", userId);
return Unauthorized(ApiResponse<object>.ErrorResponse("Invalid OTP", "OTP did not match", 401));