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 get-partners-with-bounty-submission.ts

Kiran K73a54c175646
diff --git a/apps/web/lib/api/bounties/get-partners-with-bounty-submission.ts b/apps/web/lib/api/bounties/get-partners-with-bounty-submission.ts
index 7bbb56ab73..05011b78a6 100644
--- a/apps/web/lib/api/bounties/get-partners-with-bounty-submission.ts
+++ b/apps/web/lib/api/bounties/get-partners-with-bounty-submission.ts
@@ -1,7 +1,6 @@
-import { getBountySubmissionsQuerySchema } from "@/lib/zod/schemas/bounties";
+import { BountySubmissionsQueryFilters } from "@/lib/types";
import { prisma } from "@dub/prisma";
import { Prisma } from "@prisma/client";
-import { z } from "zod";
const sortColumnsMap = {
createdAt: "bs.createdAt",
@@ -11,12 +10,6 @@ const sortColumnsMap = {
commissions: "totalCommissions",
};
-type SubmissionFilters = z.infer<typeof getBountySubmissionsQuerySchema> & {
- programId: string;
- bountyId: string;
- groupIds: string[];
-};
-
export async function getPartnersWithBountySubmission({
page,
pageSize,
@@ -25,7 +18,11 @@ export async function getPartnersWithBountySubmission({
programId,
bountyId,
groupIds,
-}: SubmissionFilters) {
+}: BountySubmissionsQueryFilters & {
+ programId: string;
+ bountyId: string;
+ groupIds: string[];
+}) {
const rows: any[] = await prisma.$queryRaw`
SELECT
p.*,