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
This commit is contained in:
alphaeusmote
2025-04-10 11:57:02 +00:00
+4 -2
View File
@@ -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) {