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

Kiran Kec5b54dfa040
diff --git a/apps/web/lib/actions/partners/approve-bounty-submission.ts b/apps/web/lib/actions/partners/approve-bounty-submission.ts
index a476fd7672..5dd4f8345f 100644
--- a/apps/web/lib/actions/partners/approve-bounty-submission.ts
+++ b/apps/web/lib/actions/partners/approve-bounty-submission.ts
@@ -42,6 +42,12 @@ export const approveBountySubmissionAction = 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 approved.",
+ );
+ }
+
if (bountySubmission.status === "approved") {
throw new Error("Bounty submission already approved.");
}