Skip to content

Commit

Permalink
Fix command issue
Browse files Browse the repository at this point in the history
Fix #1458
  • Loading branch information
lucas-mrq authored and Metal-Mighty committed Aug 23, 2024
1 parent 3bbba22 commit 72c7476
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ namespace IoTHub.Portal.Infrastructure.Services
using System.Text.Json;
using System.Threading.Tasks;
using IoTHub.Portal.Application.Services;
using IoTHub.Portal.Domain.Options;
using IoTHub.Portal.Models.v10.LoRaWAN;
using Microsoft.Extensions.Options;

internal class LoRaWanManagementService : ILoRaWanManagementService
{
private readonly HttpClient httpClient;

public LoRaWanManagementService(HttpClient httpClient)
public LoRaWanManagementService(HttpClient httpClient, IOptions<LoRaWANOptions> loRaWANOptions)
{
this.httpClient = httpClient;
this.httpClient.BaseAddress = new Uri(loRaWANOptions?.Value.KeyManagementUrl);
this.httpClient.DefaultRequestHeaders.Add("x-functions-key", loRaWANOptions?.Value.KeyManagementCode);
this.httpClient.DefaultRequestHeaders.Add("api-version", "2022-03-04");
}

public async Task<RouterConfig?> GetRouterConfig(string loRaRegion)
Expand Down

0 comments on commit 72c7476

Please sign in to comment.