split api settings

This commit is contained in:
Ryan Peters 2023-03-18 15:38:35 +00:00
parent 47d34eb4d1
commit 9add92c170
2 changed files with 6 additions and 4 deletions

View File

@ -13,8 +13,8 @@ namespace WeatherDashboard.Web.Services
{ {
this.configuration = configuration; this.configuration = configuration;
apiBaseUrl = configuration["ApiBaseUrl"]; apiBaseUrl = configuration["Api:BaseUrl"];
apiKey = configuration["ApiKey"]; apiKey = configuration["Api:Key"];
httpClient = httpClientFactory.CreateClient(); httpClient = httpClientFactory.CreateClient();
} }

View File

@ -6,6 +6,8 @@
} }
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ApiBaseUrl": "https://api.weatherapi.com", "Api": {
"ApiKey": "829fbbe5beb2424aa1021928230702" "BaseUrl": "https://api.weatherapi.com",
"Key": "829fbbe5beb2424aa1021928230702"
}
} }