diff --git a/EnvelopeGenerator.Application/Configurations/GtxMessaging/SmsParams.cs b/EnvelopeGenerator.Application/Configurations/GtxMessaging/SmsParams.cs index 1f452cf2..e52e0892 100644 --- a/EnvelopeGenerator.Application/Configurations/GtxMessaging/SmsParams.cs +++ b/EnvelopeGenerator.Application/Configurations/GtxMessaging/SmsParams.cs @@ -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; } } \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Services/GTXMessagingService.cs b/EnvelopeGenerator.Application/Services/GTXMessagingService.cs index 3ced55eb..2c1edcb7 100644 --- a/EnvelopeGenerator.Application/Services/GTXMessagingService.cs +++ b/EnvelopeGenerator.Application/Services/GTXMessagingService.cs @@ -43,7 +43,7 @@ namespace EnvelopeGenerator.Application.Services public async Task SendSmsCodeAsync(string recipient) { - var code = _codeGen.GenerateCode(5); + var code = _codeGen.GenerateCode(_smsParams.CodeLength); return await SendSmsAsync(recipient: recipient, message: code); } }