枚举不能识别
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-06-14 11:05:07 +08:00
parent ecbe8434f3
commit 493e4e8dca
4 changed files with 5 additions and 5 deletions
@@ -12,7 +12,7 @@ namespace IRaCIS.Application.Services
Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password);
Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code);
Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType);
Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType=0);
Task<UserBasicInfo> GetUserBasicInfo(Guid userId,string pwd);
Task<IResponseOutput> ModifyPassword(EditPasswordCommand editPwModel);
Task<IResponseOutput> ResetPassword(Guid userId);
@@ -656,13 +656,13 @@ namespace IRaCIS.Application.Services
/// <param name="mfaType"></param>
/// <returns></returns>
[AllowAnonymous]
public async Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType = UserMFAType.Login)
public async Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType )
{
var userInfo = await _userRepository.Where(u => u.Id == userId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync();
int verificationCode = new Random().Next(100000, 1000000);
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, mfaType);
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType );
return ResponseOutput.Ok();
}