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.

Fill Reward.groupId in the local seed script

Cursor Agentabd79308c964
diff --git a/apps/web/scripts/dev/data.json b/apps/web/scripts/dev/data.json
index ecf61cdc75..b8514342e1 100644
--- a/apps/web/scripts/dev/data.json
+++ b/apps/web/scripts/dev/data.json
@@ -78,6 +78,7 @@
"rewards": [
{
"id": "rw_1K2J9DRWPPJ2F1RX53N92TSGD",
+ "groupId": "grp_1K2J9DRWPPJ2F1RX53N92TSGC",
"event": "lead",
"type": "flat",
"amountInCents": 1000,
@@ -87,6 +88,7 @@
},
{
"id": "rw_1K2J9DRWPPJ2F1RX53N92TSGE",
+ "groupId": "grp_1K2J9DRWPPJ2F1RX53N92TSGC",
"event": "sale",
"type": "flat",
"amountInCents": 3000,
diff --git a/apps/web/scripts/dev/seed.ts b/apps/web/scripts/dev/seed.ts
index 9fafe6d266..9da1884d56 100644
--- a/apps/web/scripts/dev/seed.ts
+++ b/apps/web/scripts/dev/seed.ts
@@ -57,6 +57,7 @@ type RewardSeed = Pick<
Reward,
| "id"
| "programId"
+ | "groupId"
| "event"
| "type"
| "amountInCents"
@@ -296,6 +297,7 @@ const createRewards = async (data: SeedData) => {
data: rewards.map((reward) => ({
id: reward.id,
programId: program.id,
+ groupId: reward.groupId ?? null,
event: reward.event,
type: reward.type,
amountInCents: reward.amountInCents,