Skip to content

Commit

Permalink
Fix Db Query in CheckReward.
Browse files Browse the repository at this point in the history
  • Loading branch information
marchermans committed Nov 11, 2024
1 parent 0fdbd12 commit 00a682b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LDTTeam.Authentication.Server/Services/ConditionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class ConditionService(DatabaseContext db, IServiceProvider services, ILo

IdentityUserLogin<string>? loginInfo = await db.UserLogins
.FirstOrDefaultAsync(x =>
x.LoginProvider.Equals(provider, StringComparison.CurrentCultureIgnoreCase) &&
x.ProviderKey.Equals(providerKey, StringComparison.CurrentCultureIgnoreCase), cancellationToken: cancellationToken);
x.LoginProvider == provider &&
x.ProviderKey == providerKey, cancellationToken: cancellationToken);

var userId = loginInfo?.UserId;
if (userId != null) return await CheckReward(userId, reward, cancellationToken);
Expand All @@ -46,7 +46,7 @@ public class ConditionService(DatabaseContext db, IServiceProvider services, ILo
.FirstOrDefaultAsync(x =>
x.ClaimValue != null &&
x.ClaimType == "urn:minecraft:user:id" &&
x.ClaimValue.Equals(providerKey, StringComparison.CurrentCultureIgnoreCase), cancellationToken: cancellationToken);
x.ClaimValue == providerKey, cancellationToken: cancellationToken);

if (claim == null)
return false;
Expand Down

0 comments on commit 00a682b

Please sign in to comment.