Skip to content

Commit

Permalink
Fix the database saving the user's currency being removed before othe…
Browse files Browse the repository at this point in the history
…r checks are done
  • Loading branch information
Vylpes committed Jun 13, 2024
1 parent 0a759ed commit e41cede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buttonEvents/Claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export default class Claim extends ButtonEvent {
return;
}

await user.Save(User, user);

const claimed = await eClaim.FetchOneByClaimId(claimId);

if (claimed) {
Expand All @@ -45,6 +43,8 @@ export default class Claim extends ButtonEvent {
return;
}

await user.Save(User, user);

let inventory = await Inventory.FetchOneByCardNumberAndUserId(userId, cardNumber);

if (!inventory) {
Expand Down

0 comments on commit e41cede

Please sign in to comment.