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.

preserve configured conversion actions on re-authorization

Steven Tey3a053e3da866
diff --git a/apps/web/app/(ee)/api/google-ads/callback/route.ts b/apps/web/app/(ee)/api/google-ads/callback/route.ts
index 2519373f39..80985ac28b 100644
--- a/apps/web/app/(ee)/api/google-ads/callback/route.ts
+++ b/apps/web/app/(ee)/api/google-ads/callback/route.ts
@@ -109,7 +109,16 @@ export const GET = async (req: Request) => {
});
}
+ const existingInstallation = await prisma.installedIntegration.findFirst({
+ where: {
+ integrationId: GOOGLE_ADS_INTEGRATION_ID,
+ projectId: workspaceId,
+ },
+ select: { settings: true },
+ });
+
const settings = googleAdsSettingsSchema.parse({
+ ...((existingInstallation?.settings as Record<string, unknown>) ?? {}),
customers,
customerId,
customerName,