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