Skip to content

Commit aa67ced

Browse files
committed
small updates
1 parent 135a7b4 commit aa67ced

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

apps/web/app/(ee)/api/stripe/integration/webhook/invoice-paid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function invoicePaid(event: Stripe.Event) {
1919
const stripeCustomerId = invoice.customer as string;
2020
const invoiceId = invoice.id;
2121

22-
// Find customer using projectConnectId and stripeCustomerId
22+
// Find customer using stripeCustomerId
2323
let customer = await prisma.customer.findUnique({
2424
where: {
2525
stripeCustomerId,

apps/web/app/(ee)/api/stripe/webhook/checkout-session-completed.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
3838
const plan = getPlanFromPriceId(priceId);
3939

4040
if (!plan) {
41-
await log({
42-
message: `Invalid price ID in checkout.session.completed event: ${priceId}`,
43-
type: "errors",
44-
});
41+
console.log(
42+
`Invalid price ID in checkout.session.completed event: ${priceId}`,
43+
);
4544
return;
4645
}
4746

apps/web/app/(ee)/api/stripe/webhook/customer-subscription-updated.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { deleteWorkspaceFolders } from "@/lib/api/folders/delete-workspace-folders";
22
import { webhookCache } from "@/lib/webhook/cache";
33
import { prisma } from "@dub/prisma";
4-
import { getPlanFromPriceId, log } from "@dub/utils";
4+
import { getPlanFromPriceId } from "@dub/utils";
55
import { NextResponse } from "next/server";
66
import Stripe from "stripe";
77
import { sendCancellationFeedback } from "./utils";
@@ -13,10 +13,9 @@ export async function customerSubscriptionUpdated(event: Stripe.Event) {
1313
const plan = getPlanFromPriceId(priceId);
1414

1515
if (!plan) {
16-
await log({
17-
message: `Invalid price ID in customer.subscription.updated event: ${priceId}`,
18-
type: "errors",
19-
});
16+
console.log(
17+
`Invalid price ID in customer.subscription.updated event: ${priceId}`,
18+
);
2019
return;
2120
}
2221

0 commit comments

Comments
 (0)