Used queries to get data from scrape database instead of FabTime to use a single data source.

This commit is contained in:
Daniel Wathen
2023-01-11 09:46:03 -07:00
parent cb14e93ad5
commit 43e5ec3e28
22 changed files with 1350 additions and 118 deletions

View File

@ -8,12 +8,19 @@ namespace ReportingServices.Shared.HelperClasses
{
public static async Task<T> GetApi<T>(string url)
{
T deserializedJson;
T deserializedJson = default(T);
using (HttpClient client = new())
try
{
string apiResponse = await client.GetStringAsync(url);
deserializedJson = JsonSerializer.Deserialize<T>(apiResponse);
using (HttpClient client = new())
{
string apiResponse = await client.GetStringAsync(url);
deserializedJson = JsonSerializer.Deserialize<T>(apiResponse);
}
}
catch (Exception ex)
{
}
return deserializedJson;