Skip to content

Commit

Permalink
modify: stress test.
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-zhaolei committed Dec 14, 2024
1 parent ee857cd commit 9635767
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public async Task<ResponseResultDto<SendVerificationRequestDto>> SendVerificatio
};
}

await verifyCodeSender.SendCodeByGuardianIdentifierAsync(input.GuardianIdentifier, dto.Data.VerifierCode, input.ShowOperationDetails);
//await verifyCodeSender.SendCodeByGuardianIdentifierAsync(input.GuardianIdentifier, dto.Data.VerifierCode, input.ShowOperationDetails);
return new ResponseResultDto<SendVerificationRequestDto>
{
Success = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public async Task<GrainResultDto<VerifyCodeDto>> GetVerifyCodeAsync(SendVerifica
OperationDetails = input.OperationDetails
};
//create code
var randomCode = await GetCodeAsync(6);
// var randomCode = await GetCodeAsync(6);
var randomCode = "111111";
//var randomCode = await GetCodeAsync(6);
guardianIdentifierVerification.VerificationCode = randomCode;
guardianIdentifierVerification.VerificationCodeSentTime = _clock.Now;
verifications ??= new List<GuardianIdentifierVerification>();
Expand Down Expand Up @@ -138,12 +140,12 @@ public async Task<GrainResultDto<UpdateVerifierSignatureDto>> VerifyAndCreateSig
}

var guardianTypeVerification = verifications[0];
var errorCode = VerifyCodeAsync(guardianTypeVerification, input.Code);
if (errorCode > 0)
{
dto.Message = Error.Message[errorCode];
return dto;
}
// var errorCode = VerifyCodeAsync(guardianTypeVerification, input.Code);
// if (errorCode > 0)
// {
// dto.Message = Error.Message[errorCode];
// return dto;
// }

guardianTypeVerification.VerifiedTime = _clock.Now;
guardianTypeVerification.Verified = true;
Expand Down Expand Up @@ -185,12 +187,12 @@ public async Task<GrainResultDto<bool>> VerifySecondaryEmailCodeAsync(SecondaryE
}

var guardianTypeVerification = verifications[0];
var errorCode = VerifyCodeAsync(guardianTypeVerification, input.Code);
if (errorCode > 0)
{
dto.Message = Error.Message[errorCode];
return dto;
}
// var errorCode = VerifyCodeAsync(guardianTypeVerification, input.Code);
// if (errorCode > 0)
// {
// dto.Message = Error.Message[errorCode];
// return dto;
// }

guardianTypeVerification.VerifiedTime = _clock.Now;
guardianTypeVerification.Verified = true;
Expand Down

0 comments on commit 9635767

Please sign in to comment.