ver
This commit is contained in:
@@ -16,14 +16,14 @@ namespace Back.Services
|
||||
return await _verificationCodeRepo.Get(w => w.prm == Prm).FirstOrDefaultAsync();
|
||||
|
||||
}
|
||||
public async Task<VerificationCode> GetRegistrationCode(int ID)
|
||||
public async Task<VerificationCode> GetVerificationCode(int ID)
|
||||
{
|
||||
return await _verificationCodeRepo.Get(w => w.ID == ID).FirstOrDefaultAsync();
|
||||
}
|
||||
public async Task<int> GenerateCode(VerificationCode code)
|
||||
{
|
||||
code.Code = Random.Shared.Next(1000, 9000);
|
||||
while (await GetRegistrationCode(code.ID) != null)
|
||||
while (await GetVerificationCode(code.ID) != null)
|
||||
code.Code = Random.Shared.Next(1000, 9000);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user