This commit is contained in:
mmrbnjd
2024-04-14 22:19:39 +03:30
parent f7e3f3b02a
commit 3f429e0539
8 changed files with 118 additions and 42 deletions

View File

@@ -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;
}
}
}