Skip to content

Commit 89877b4

Browse files
committed
fix(billing): release checkout admission claim
1 parent 485d1ab commit 89877b4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/sim/lib/auth/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,11 +1041,11 @@ export const auth = betterAuth({
10411041
}),
10421042
after: createAuthMiddleware(async (ctx) => {
10431043
if (!isBillingEnabled || ctx.path !== '/subscription/upgrade') return
1044-
const context = ctx.context as typeof ctx.context & {
1044+
const checkoutContext = ctx as typeof ctx & {
10451045
billingCheckoutAdmissionClaim?: CheckoutAdmissionClaim
10461046
}
1047-
if (context.billingCheckoutAdmissionClaim) {
1048-
await releaseCheckoutAdmission(context.billingCheckoutAdmissionClaim)
1047+
if (checkoutContext.billingCheckoutAdmissionClaim) {
1048+
await releaseCheckoutAdmission(checkoutContext.billingCheckoutAdmissionClaim)
10491049
}
10501050
}),
10511051
},

0 commit comments

Comments
 (0)