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

Kiran Kb71d4abd88fc
diff --git a/apps/web/lib/zod/schemas/rewards.ts b/apps/web/lib/zod/schemas/rewards.ts
index ac9ad63756..ce9ceb9410 100644
--- a/apps/web/lib/zod/schemas/rewards.ts
+++ b/apps/web/lib/zod/schemas/rewards.ts
@@ -18,7 +18,7 @@ export const rewardSchema = z.object({
export const createOrUpdateRewardSchema = z.object({
event: z.nativeEnum(EventType),
type: z.nativeEnum(CommissionType).default("flat"),
- amount: z.number().int().min(0),
+ amount: z.number().min(0),
maxDuration: z.coerce
.number()
.refine((val) => RECURRING_MAX_DURATIONS.includes(val), {
@@ -40,6 +40,5 @@ export const createRewardSchema = createOrUpdateRewardSchema.superRefine(
export const updateRewardSchema = createOrUpdateRewardSchema
.omit({
event: true,
- isDefault: true,
})
.partial();