Clean up unused code
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user