This commit is contained in:
mmrbnjd
2024-04-29 07:58:41 +03:30
parent fd13de3e1d
commit 7b8127dc72
23 changed files with 526 additions and 39 deletions

View File

@@ -17,13 +17,15 @@ namespace Back.Controllers
private readonly GetVerificationValidation _getVerificationValidation;
private readonly servSendMsg _servSendMsg;
private readonly servCompany _servCompany;
private readonly servUser _servUser;
public VerificationController(ServValidatinMsg servValidatinMsg, GetVerificationValidation getVerificationValidation
, servCompany servCompany, servSendMsg servSendMsg)
, servCompany servCompany, servSendMsg servSendMsg, servUser servUser)
{
_servValidatinMsg = servValidatinMsg;
_getVerificationValidation = getVerificationValidation;
_servCompany = servCompany;
_servSendMsg = servSendMsg;
_servUser = servUser;
}
[HttpGet("GetVerification/{ID}")]
[AllowAnonymous]
@@ -61,6 +63,12 @@ namespace Back.Controllers
_servSendMsg.Authentication(company.Mobile, ID.ToString());
break;
case "ForgetPassword":
var user = await _servUser.ChangePasswordByMobile(_getVerificationValidation.verificationCode.prm, _getVerificationValidation.verificationCode.val);
_servSendMsg.Authentication(_getVerificationValidation.verificationCode.prm, ID.ToString());
break;
default:
return BadRequest("این نوع احراز تعریف نشده");
}