Skip to content

Commit

Permalink
fix(subs): pass autoRenews through Stripe
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreCat committed Oct 17, 2024
1 parent 6819e7b commit 1946930
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/server/libs/payments/stripe/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function checkSubData (sub, isGroup = false, coupon) {

export async function applySubscription (session) {
const { metadata, customer: customerId, subscription: subscriptionId } = session;
const { sub: subStringified, userId, groupId } = metadata;
const { sub: subStringified, userId, groupId, gift } = metadata;

Check failure on line 38 in website/server/libs/payments/stripe/subscriptions.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Expected a line break after this opening brace

Check failure on line 38 in website/server/libs/payments/stripe/subscriptions.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Expected a line break before this closing brace

Check failure on line 38 in website/server/libs/payments/stripe/subscriptions.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Expected a line break after this opening brace

Check failure on line 38 in website/server/libs/payments/stripe/subscriptions.js

View workflow job for this annotation

GitHub Actions / lint (21.x)

Expected a line break before this closing brace

const sub = subStringified ? JSON.parse(subStringified) : undefined;

Expand All @@ -49,6 +49,7 @@ export async function applySubscription (session) {
sub,
groupId,
subscriptionId,
autoRenews: Boolean(gift),
});
}

Expand Down

0 comments on commit 1946930

Please sign in to comment.