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 the test

Kiran K783356f921e7
diff --git a/apps/web/lib/api/bounties/validate-bounty.ts b/apps/web/lib/api/bounties/validate-bounty.ts
index 5828eca8e4..2e69a088f9 100644
--- a/apps/web/lib/api/bounties/validate-bounty.ts
+++ b/apps/web/lib/api/bounties/validate-bounty.ts
@@ -4,7 +4,7 @@ import { DubApiError } from "../errors";
type CreateBountyInput = Partial<z.infer<typeof createBountySchema>>;
-export async function validateBounty({
+export function validateBounty({
type,
startsAt,
endsAt,
diff --git a/apps/web/tests/bounties/index.test.ts b/apps/web/tests/bounties/index.test.ts
index 9273e05c6e..ca4fdfc73e 100644
--- a/apps/web/tests/bounties/index.test.ts
+++ b/apps/web/tests/bounties/index.test.ts
@@ -194,9 +194,12 @@ describe.sequential("/bounties/**", async () => {
});
test("PATCH /bounties/{bountyId}", async () => {
+ const now = new Date();
+ const endsAt = addDays(now, 30);
+
const toUpdate = {
name: "Submission Bounty Updated",
- endsAt: new Date().toISOString(),
+ endsAt: endsAt.toISOString(),
rewardAmount: 2000,
submissionRequirements: ["image"],
};