Used queries to get data from scrape database instead of FabTime to use a single data source.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user