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

Kiran Kdee04e2494b1
diff --git a/apps/web/lib/actions/partners/create-program.ts b/apps/web/lib/actions/partners/create-program.ts
index 45dbaedf6a..4365cf7e43 100644
--- a/apps/web/lib/actions/partners/create-program.ts
+++ b/apps/web/lib/actions/partners/create-program.ts
@@ -55,6 +55,9 @@ export const createProgram = async ({
// create a new program
const program = await prisma.$transaction(async (tx) => {
const folderId = createId({ prefix: "fold_" });
+ const programId = createId({ prefix: "prog_" });
+ const defaultGroupId = createId({ prefix: "grp_" });
+
const programFolder = await tx.folder.upsert({
where: {
name_projectId: {
@@ -77,9 +80,6 @@ export const createProgram = async ({
},
});
- const programId = createId({ prefix: "prog_" });
- const defaultGroupId = createId({ prefix: "grp_" });
-
const logoUrl = uploadedLogo
? await storage
.upload(`programs/${programId}/logo_${nanoid(7)}`, uploadedLogo)