Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules

This commit is contained in:
Kwoth
2022-02-02 01:44:45 +01:00
parent b22cd5a81e
commit ffa2c3f119
202 changed files with 2108 additions and 920 deletions

View File

@@ -51,7 +51,7 @@ public class PatreonRewardsService : INService, IReadyExecutor
{
if (_client.ShardId != 0)
return;
var t = new PeriodicTimer(Interval);
do
{
@@ -133,7 +133,7 @@ public class PatreonRewardsService : INService, IReadyExecutor
var lastUpdate = LastAccessTokenUpdate(creds);
var now = DateTime.UtcNow;
if (lastUpdate.Year != now.Year
|| lastUpdate.Month != now.Month
|| string.IsNullOrWhiteSpace(creds.Patreon.AccessToken))
@@ -143,7 +143,7 @@ public class PatreonRewardsService : INService, IReadyExecutor
// -> update access token
if (!HasPatreonCreds(creds))
return;
var success = await UpdateAccessToken(creds);
if (!success)
return;
@@ -198,7 +198,8 @@ public class PatreonRewardsService : INService, IReadyExecutor
})
.ToList();
foreach (var pledge in userData) await ClaimReward(pledge.UserId, pledge.PatreonUserId, pledge.EntitledTo);
foreach (var pledge in userData)
await ClaimReward(pledge.UserId, pledge.PatreonUserId, pledge.EntitledTo);
}
catch (HttpRequestException ex) when (ex.StatusCode == HttpStatusCode.Unauthorized)
{
@@ -229,7 +230,9 @@ public class PatreonRewardsService : INService, IReadyExecutor
{
users.Add(new()
{
PatreonUserId = patreonUserId, LastReward = now, AmountRewardedThisMonth = eligibleFor
PatreonUserId = patreonUserId,
LastReward = now,
AmountRewardedThisMonth = eligibleFor
});
await uow.SaveChangesAsync();