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.

fix PartnerPayoutResponseSchema

Steven Tey27ad46899fa2
diff --git a/apps/web/lib/zod/schemas/payouts.ts b/apps/web/lib/zod/schemas/payouts.ts
index 08b2417d97..cde075e870 100644
--- a/apps/web/lib/zod/schemas/payouts.ts
+++ b/apps/web/lib/zod/schemas/payouts.ts
@@ -3,6 +3,7 @@ import { PayoutStatus, PayoutType } from "@dub/prisma/client";
import { z } from "zod";
import { getPaginationQuerySchema } from "./misc";
import { PartnerSchema, PAYOUTS_MAX_PAGE_SIZE } from "./partners";
+import { ProgramSchema } from "./programs";
export const createManualPayoutSchema = z.object({
workspaceId: z.string(),
@@ -61,6 +62,13 @@ export const PayoutResponseSchema = PayoutSchema.merge(
export const PartnerPayoutResponseSchema = PayoutResponseSchema.omit({
partner: true,
- fee: true,
- total: true,
-});
+}).merge(
+ z.object({
+ program: ProgramSchema.pick({
+ id: true,
+ name: true,
+ slug: true,
+ logo: true,
+ }),
+ }),
+);