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 route.ts

Kiran Ka690c592b1ef
diff --git a/apps/web/app/(ee)/api/bounties/[bountyId]/route.ts b/apps/web/app/(ee)/api/bounties/[bountyId]/route.ts
index 0af07052d0..861bb530ea 100644
--- a/apps/web/app/(ee)/api/bounties/[bountyId]/route.ts
+++ b/apps/web/app/(ee)/api/bounties/[bountyId]/route.ts
@@ -101,9 +101,10 @@ export const PATCH = withWorkspace(
startsAt: startsAt!, // Can remove the ! when we're on a newer TS version (currently 5.4.4)
endsAt,
rewardAmount,
- ...(bounty.type === "submission" && {
- submissionRequirements: submissionRequirements ?? Prisma.JsonNull,
- }),
+ ...(bounty.type === "submission" &&
+ submissionRequirements !== undefined && {
+ submissionRequirements: submissionRequirements ?? Prisma.JsonNull,
+ }),
groups: {
deleteMany: {},
create: groups.map((group) => ({