Skip to content

Commit

Permalink
Added more logging due to patreon update
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoAbove committed Sep 8, 2024
1 parent e70ae1f commit 759c680
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server/patreon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,13 @@ const getComputeAmountForTier = tierId => {
let amount;

switch (tierId) {
case undefined: {
amount = nonHamisAmount;
break;
}
case "9702578": {
// Hämis
amount = hamisAmount;

break;
}
case "9702590": {
Expand Down Expand Up @@ -619,8 +622,12 @@ const updatePatreonCompute = async () => {
if (patron) {
const tierIds = patron.relationships.currently_entitled_tiers.data.map(t => t.id);
tierId = tierIds[0];
} else {
logs.push({ message: "User not found in patron members", userId: user.id });
}

logs.push({ message: "Tier ID", tierId });

const amount = getComputeAmountForTier(tierId);
logs.push({ message: "Compute amount calculated", userId: user.id, tierId, amount });

Expand Down

0 comments on commit 759c680

Please sign in to comment.