feat(EnvelopeLocked): Timer mit CSS-Konfiguration und Javascript-Ereignis hinzugefügt.
- Ablauf über Home-Controller-Ansichtsdaten hinzugefügt
This commit is contained in:
@@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Services
|
||||
|
||||
public static CodeGenerator Static => LazyStatic.Value;
|
||||
|
||||
private readonly string _charPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
private readonly string _charPool;
|
||||
|
||||
public CodeGenerator(IOptions<CodeGeneratorConfig> options)
|
||||
{
|
||||
|
||||
@@ -61,10 +61,13 @@ namespace EnvelopeGenerator.Application.Services
|
||||
code = _codeGen.GenerateCode(_smsParams.CodeLength);
|
||||
|
||||
await _cache.SetStringAsync(code_key, code, _codeCacheOptions);
|
||||
|
||||
var expiration = DateTime.Now + _smsParams.CodeCacheValidityPeriod;
|
||||
await _cache.SetDateTimeAsync(code_expiration_key, expiration, _codeCacheOptions);
|
||||
|
||||
await _cache.SetDateTimeAsync(code_expiration_key, DateTime.Now + _smsParams.CodeCacheValidityPeriod, _codeCacheOptions);
|
||||
|
||||
return await SendSmsAsync(recipient: recipient, message: code);
|
||||
var res = await SendSmsAsync(recipient: recipient, message: code);
|
||||
res.Expiration = expiration;
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user