Many IDisposable fixes. GlobalNadeko won't have file watchers for creds. Wallet simplified

This commit is contained in:
Kwoth
2022-03-21 15:33:18 +01:00
parent 4cf3bdb53a
commit b7d1fd1b47
25 changed files with 229 additions and 221 deletions

View File

@@ -84,12 +84,13 @@ public class PatreonRewardsService : INService, IReadyExecutor
try
{
using var http = _httpFactory.CreateClient();
var res = await http.PostAsync("https://www.patreon.com/api/oauth2/token"
using var content = new StringContent(string.Empty);
using var res = await http.PostAsync("https://www.patreon.com/api/oauth2/token"
+ "?grant_type=refresh_token"
+ $"&refresh_token={creds.Patreon.RefreshToken}"
+ $"&client_id={creds.Patreon.ClientId}"
+ $"&client_secret={creds.Patreon.ClientSecret}",
new StringContent(string.Empty));
content);
res.EnsureSuccessStatusCode();