Skip to content

Commit

Permalink
feat: new stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Dec 5, 2024
1 parent 47795b2 commit 1bf0d24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/app/api/webhook/handlers/checkout-complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const handleSubscription = async (
session: Stripe.Checkout.Session & { metadata: ProductMetadata }
) => {
const metadata = session.metadata;
console.log("creating subscription with metadata", metadata);

await db.insert(UserUsageTable).values({
userId: metadata.userId,
Expand All @@ -35,6 +36,7 @@ const handlePayOnce = async (
session: Stripe.Checkout.Session & { metadata: ProductMetadata }
) => {
const metadata = session.metadata;
console.log("creating pay once with metadata", metadata);
await db.insert(UserUsageTable).values({
userId: metadata.userId,
subscriptionStatus: "active",
Expand Down

0 comments on commit 1bf0d24

Please sign in to comment.