feat(SmsParams): Aktualisiert, um IHttpClientOptions zu implementieren
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user