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/e95d8c16-766d-443a-be3e-5abb947e3251.jpg
This commit is contained in:
alphaeusmote
2025-04-10 11:55:14 +00:00
+4 -2
View File
@@ -138,6 +138,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
@@ -156,7 +157,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) {
@@ -173,6 +174,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
@@ -190,7 +192,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) {