update to .net 9
This commit is contained in:
parent
e8feedb979
commit
48a11be7b7
9 changed files with 99 additions and 173 deletions
|
|
@ -30,8 +30,10 @@ public class DiscordRequestService
|
|||
private readonly IClock _clock;
|
||||
private readonly ApiTokenRepository _tokenRepository;
|
||||
|
||||
private static readonly JsonSerializerOptions JsonOptions =
|
||||
new() { PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower };
|
||||
private static readonly JsonSerializerOptions JsonOptions = new()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
|
||||
};
|
||||
|
||||
public DiscordRequestService(
|
||||
ILogger logger,
|
||||
|
|
@ -82,8 +84,9 @@ public class DiscordRequestService
|
|||
}
|
||||
|
||||
private static readonly Uri DiscordUserUri = new("https://discord.com/api/v10/users/@me");
|
||||
private static readonly Uri DiscordGuildsUri =
|
||||
new("https://discord.com/api/v10/users/@me/guilds");
|
||||
private static readonly Uri DiscordGuildsUri = new(
|
||||
"https://discord.com/api/v10/users/@me/guilds"
|
||||
);
|
||||
private static readonly Uri DiscordTokenUri = new("https://discord.com/api/oauth2/token");
|
||||
|
||||
public async Task<User> GetMeAsync(string token) => await GetAsync<User>(DiscordUserUri, token);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue