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.

Update send-paypal-payouts.ts

Kiran Ka6bb58f6518e
diff --git a/apps/web/app/api/cron/payouts/charge-succeeded/send-paypal-payouts.ts b/apps/web/app/api/cron/payouts/charge-succeeded/send-paypal-payouts.ts
index 881dc3668e..cb33091778 100644
--- a/apps/web/app/api/cron/payouts/charge-succeeded/send-paypal-payouts.ts
+++ b/apps/web/app/api/cron/payouts/charge-succeeded/send-paypal-payouts.ts
@@ -1,7 +1,6 @@
import { qstash } from "@/lib/cron";
import { createPaypalToken } from "@/lib/paypal/create-paypal-token";
import { paypalEnv } from "@/lib/paypal/env";
-import { prisma } from "@dub/prisma";
import { APP_DOMAIN_WITH_NGROK } from "@dub/utils";
import { Payload, Payouts } from "./utils";
@@ -52,19 +51,6 @@ export async function sendPaypalPayouts({
if (!response.ok) {
console.error("Error creating PayPal batch payout", data);
- console.log("Resetting payout status to pending");
-
- await prisma.payout.updateMany({
- where: {
- id: {
- in: payouts.map((payout) => payout.id),
- },
- },
- data: {
- status: "pending",
- invoiceId: null,
- },
- });
// schedule a retry after 24 hours (TBD)
await qstash.publishJSON({