Clean up unused code
This commit is contained in:
parent
1a3450f6f9
commit
58576796c2
|
|
@ -33,24 +33,6 @@ namespace AS1024.CommunityDocumentationPage.Controllers
|
|||
return View(filtered);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
private async Task<RouteTargets> ReadAPI(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpClient client = new();
|
||||
client.DefaultRequestHeaders.Clear();
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Token", token);
|
||||
var result = await client.GetAsync(BuildNetBoxURI().AbsoluteUri);
|
||||
var stringResult = await result.Content.ReadAsStringAsync();
|
||||
return JsonConvert.DeserializeObject<RouteTargets>(stringResult);
|
||||
} catch
|
||||
{
|
||||
throw new Exception("Something went wrong?");
|
||||
}
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
protected Uri BuildNetBoxURI()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue