feat(SmsParams): Aktualisiert, um IHttpClientOptions zu implementieren

This commit is contained in:
Developer 02
2024-11-25 12:47:30 +01:00
parent 6e6f3fd2ed
commit ed80839777
3 changed files with 7 additions and 53 deletions

View File

@@ -1,29 +1,20 @@
using DigitalData.Core.Abstractions.Client;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Configurations.GtxMessaging;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.Application.Services
{
public class GtxMessagingService
{
private readonly SmsParams _smsParams;
private readonly IHttpClientService<SmsParams> _smsClient;
private readonly string _authPath;
public GtxMessagingService(IOptions<SmsParams> smsParamsOptions, IHttpClientService<SmsParams> smsClient)
public GtxMessagingService(IHttpClientService<SmsParams> smsClient)
{
_smsParams = smsParamsOptions.Value;
_smsClient = smsClient;
_authPath = _smsParams.AuthPath;
}
public async Task SendSms()
{
await _smsClient.FetchAsync(path: _authPath);
await _smsClient.FetchAsync();
}
}
}