From d7f9c914311850543bdfe435f110438344aa9a98 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Thu, 10 Apr 2025 11:57:02 +0000 Subject: [PATCH] Add domain provider ID to database storage. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/cf89d920-5b2b-4c12-a36a-470713a7611c.jpg --- server/database-storage.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/database-storage.ts b/server/database-storage.ts index 43df3a5..1002986 100644 --- a/server/database-storage.ts +++ b/server/database-storage.ts @@ -101,6 +101,7 @@ export class DatabaseStorage implements IStorage { id, name, organization_id as "organizationId", + provider_id as "providerId", is_active as "isActive", created_at as "createdAt" FROM domains @@ -121,7 +122,7 @@ export class DatabaseStorage implements IStorage { organizationId: row.organizationId as string, isActive: Boolean(row.isActive), createdAt: row.createdAt ? new Date(row.createdAt as string) : new Date(), - providerId: '', // Default value for expected field + providerId: row.providerId as string || '', // Use providerId from the database lastUpdated: null // Default value for expected field }; } catch (error) { @@ -285,6 +286,7 @@ export class DatabaseStorage implements IStorage { id, name, organization_id as "organizationId", + provider_id as "providerId", is_active as "isActive", created_at as "createdAt" `; @@ -304,7 +306,7 @@ export class DatabaseStorage implements IStorage { organizationId: row.organizationId as string, isActive: Boolean(row.isActive), createdAt: row.createdAt ? new Date(row.createdAt as string) : new Date(), - providerId: existingDomain.providerId || '', // Keep existing value + providerId: row.providerId as string || '', // Use providerId from the database lastUpdated: new Date() // Use current date for lastUpdated }; } catch (error) {