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 reject-bounty-submission.ts

Kiran Kc8a29d8d1ad2
diff --git a/apps/web/lib/actions/partners/reject-bounty-submission.ts b/apps/web/lib/actions/partners/reject-bounty-submission.ts
index dff78f6026..aba073a3f8 100644
--- a/apps/web/lib/actions/partners/reject-bounty-submission.ts
+++ b/apps/web/lib/actions/partners/reject-bounty-submission.ts
@@ -38,6 +38,12 @@ export const rejectBountySubmissionAction = authActionClient
throw new Error("Bounty submission does not belong to this program.");
}
+ if (bountySubmission.status === "draft") {
+ throw new Error(
+ "Bounty submission is in progress and cannot be rejected.",
+ );
+ }
+
if (bountySubmission.status === "rejected") {
throw new Error("Bounty submission already rejected.");
}