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 K5aff409eab2f
diff --git a/apps/web/lib/actions/partners/create-reward.ts b/apps/web/lib/actions/partners/create-reward.ts
index e4f1674a72..aeb39a6414 100644
--- a/apps/web/lib/actions/partners/create-reward.ts
+++ b/apps/web/lib/actions/partners/create-reward.ts
@@ -35,7 +35,7 @@ export const createRewardAction = authActionClient
programId,
});
- await prisma.$transaction(async (tx) => {
+ const reward = await prisma.$transaction(async (tx) => {
const reward = await tx.reward.create({
data: {
id: createId({ prefix: "rw_" }),
@@ -67,6 +67,8 @@ export const createRewardAction = authActionClient
[rewardIdColumn]: reward.id,
},
});
+
+ return reward;
});
waitUntil(