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 create-reward.ts

Kiran Ka8cd011207e4
diff --git a/apps/web/lib/actions/partners/create-reward.ts b/apps/web/lib/actions/partners/create-reward.ts
index 7ac519a0dc..2d27ec3cf8 100644
--- a/apps/web/lib/actions/partners/create-reward.ts
+++ b/apps/web/lib/actions/partners/create-reward.ts
@@ -11,8 +11,16 @@ export const createRewardAction = authActionClient
.schema(createRewardSchema)
.action(async ({ parsedInput, ctx }) => {
const { workspace } = ctx;
- const { programId, partnerIds, event, amount, type, maxDuration } =
- parsedInput;
+ const {
+ programId,
+ partnerIds,
+ event,
+ amount,
+ type,
+ maxDuration,
+ maxTotalPayout,
+ payoutResetInterval,
+ } = parsedInput;
const program = await getProgramOrThrow({
workspaceId: workspace.id,
@@ -87,6 +95,8 @@ export const createRewardAction = authActionClient
type,
amount,
maxDuration,
+ maxTotalPayout,
+ payoutResetInterval,
...(programEnrollments && {
partners: {
createMany: {