From b779ef6f0ba940a2c6b4dd42c93c2b1a83daecd8 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 29 Nov 2024 11:16:08 +0100 Subject: [PATCH] =?UTF-8?q?feat(GtxMessagingService):=20Konfigurierte=20Co?= =?UTF-8?q?del=C3=A4nge=20=C3=BCber=20ioptions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Standardmäßig ist sie 5 --- .../Configurations/GtxMessaging/SmsParams.cs | 2 ++ EnvelopeGenerator.Application/Services/GTXMessagingService.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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); } }