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 update-hubspot-settings.ts

Kiran Kcc3a2c038646
diff --git a/apps/web/lib/integrations/hubspot/update-hubspot-settings.ts b/apps/web/lib/integrations/hubspot/update-hubspot-settings.ts
index b37fb711b9..a23b8f707a 100644
--- a/apps/web/lib/integrations/hubspot/update-hubspot-settings.ts
+++ b/apps/web/lib/integrations/hubspot/update-hubspot-settings.ts
@@ -22,6 +22,7 @@ export const updateHubSpotSettingsAction = authActionClient
const installedIntegration = await prisma.installedIntegration.findFirst({
where: {
integrationId: HUBSPOT_INTEGRATION_ID,
+ projectId: workspace.id,
},
});
@@ -31,12 +32,15 @@ export const updateHubSpotSettingsAction = authActionClient
);
}
+ const current = (installedIntegration.settings as any) ?? {};
+
await prisma.installedIntegration.update({
where: {
id: installedIntegration.id,
},
data: {
settings: {
+ ...current,
closedWonDealStageId,
},
},