Skip to content

Commit 0621bff

Browse files
committed
cleanup
1 parent cc4799c commit 0621bff

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

ModBrowser/GithubApi/GithubApiClient.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class GithubApiClient
1616
/// <summary>
1717
/// The HTTP client used to communicate witth the GitHub web API.
1818
/// </summary>
19-
private readonly HttpClient HttpClient = new HttpClient() { BaseAddress = new Uri("https://sporemodbrowser-gh-api.kade.workers.dev/") };
19+
private readonly HttpClient HttpClient = new() { BaseAddress = new Uri("https://sporemodbrowser-gh-api.kade.workers.dev/") };
2020

2121
/// <summary>
2222
/// Creates a new HTTP client for accessing the GitHub web API.
@@ -106,11 +106,7 @@ public async Task<Repository> GetRepositoryAsync(string repositoryOwner, string
106106
public async Task<string?> GetFileAsync(string endpoint)
107107
{
108108
// Construct the request
109-
var request = new HttpRequestMessage()
110-
{
111-
RequestUri = new Uri(HttpClient.BaseAddress, endpoint),
112-
Method = HttpMethod.Get
113-
};
109+
var request = new HttpRequestMessage(HttpMethod.Get, endpoint);
114110
request.Headers.Accept.Clear();
115111
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/vnd.github.v3.raw"));
116112

SporeCommunity.ModBrowser.Blazor/App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
1+
<Router AppAssembly="@typeof(Program).Assembly">
22
<Found Context="routeData">
33
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
44
</Found>

0 commit comments

Comments
 (0)