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

Steven Tey0d394c90c100
diff --git a/apps/web/lib/actions/partners/onboard-program.ts b/apps/web/lib/actions/partners/onboard-program.ts
index 65672ee97d..687d2c833d 100644
--- a/apps/web/lib/actions/partners/onboard-program.ts
+++ b/apps/web/lib/actions/partners/onboard-program.ts
@@ -46,7 +46,7 @@ const saveOnboardingProgress = async ({
workspace,
data,
}: {
- workspace: Pick<Project, "id" | "store" | "slug">;
+ workspace: Pick<Project, "id" | "slug" | "defaultProduct" | "store">;
data: z.infer<typeof onboardProgramSchema>;
}) => {
const store =
@@ -65,6 +65,9 @@ const saveOnboardingProgress = async ({
id: workspace.id,
},
data: {
+ // set defaultProduct to "program" if it's not already set
+ defaultProduct:
+ workspace.defaultProduct !== "program" ? "program" : undefined,
store: {
...store,
programOnboarding: {