feat(GtxMessagingService): Konfigurierte Codelänge über ioptions.

- Standardmäßig ist sie 5
This commit is contained in:
Developer 02 2024-11-29 11:16:08 +01:00
parent 0c81a86610
commit b779ef6f0b
2 changed files with 3 additions and 1 deletions

View File

@ -18,5 +18,7 @@ namespace EnvelopeGenerator.Application.Configurations.GtxMessaging
public string RecipientQueryParamName { get; init; } = "to";
public string MessageQueryParamName { get; init; } = "text";
public int CodeLength { get; init; } = 5;
}
}

View File

@ -43,7 +43,7 @@ namespace EnvelopeGenerator.Application.Services
public async Task<SmsResponse> SendSmsCodeAsync(string recipient)
{
var code = _codeGen.GenerateCode(5);
var code = _codeGen.GenerateCode(_smsParams.CodeLength);
return await SendSmsAsync(recipient: recipient, message: code);
}
}