Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

small updates

Steven Teyaa67ced27159
diff --git a/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts b/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts
index 7847a9e3dc..fd56a6d575 100644
--- a/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts
+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts
@@ -19,7 +19,7 @@ export async function invoicePaid(event: Stripe.Event) {
const stripeCustomerId = invoice.customer as string;
const invoiceId = invoice.id;
- // Find customer using projectConnectId and stripeCustomerId
+ // Find customer using stripeCustomerId
let customer = await prisma.customer.findUnique({
where: {
stripeCustomerId,
diff --git a/apps/web/app/(ee)/api/stripe/webhook/checkout-session-completed.ts b/apps/web/app/(ee)/api/stripe/webhook/checkout-session-completed.ts
index ee614823d9..e85b4e1361 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/checkout-session-completed.ts
+++ b/apps/web/app/(ee)/api/stripe/webhook/checkout-session-completed.ts
@@ -38,10 +38,9 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
const plan = getPlanFromPriceId(priceId);
if (!plan) {
- await log({
- message: `Invalid price ID in checkout.session.completed event: ${priceId}`,
- type: "errors",
- });
+ console.log(
+ `Invalid price ID in checkout.session.completed event: ${priceId}`,
+ );
return;
}
diff --git a/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-updated.ts b/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-updated.ts
index 58686ed214..312ccd3cde 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-updated.ts
+++ b/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-updated.ts
@@ -1,7 +1,7 @@
import { deleteWorkspaceFolders } from "@/lib/api/folders/delete-workspace-folders";
import { webhookCache } from "@/lib/webhook/cache";
import { prisma } from "@dub/prisma";
-import { getPlanFromPriceId, log } from "@dub/utils";
+import { getPlanFromPriceId } from "@dub/utils";
import { NextResponse } from "next/server";
import Stripe from "stripe";
import { sendCancellationFeedback } from "./utils";
@@ -13,10 +13,9 @@ export async function customerSubscriptionUpdated(event: Stripe.Event) {
const plan = getPlanFromPriceId(priceId);
if (!plan) {
- await log({
- message: `Invalid price ID in customer.subscription.updated event: ${priceId}`,
- type: "errors",
- });
+ console.log(
+ `Invalid price ID in customer.subscription.updated event: ${priceId}`,
+ );
return;
}