Improve domain creation: Allow optional provider ID.

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/752f28c8-2f6f-4065-8649-1fc8dea4498d.jpg
This commit is contained in:
alphaeusmote
2025-04-10 03:49:58 +00:00
parent 93d621a868
commit b7ae507367
2 changed files with 20 additions and 7 deletions
+11 -6
View File
@@ -191,12 +191,17 @@ export const insertOrganizationSchema = createInsertSchema(organizations).pick({
isActive: true,
});
export const insertDomainSchema = createInsertSchema(domains).pick({
name: true,
organizationId: true,
providerId: true,
isActive: true,
});
export const insertDomainSchema = createInsertSchema(domains)
.pick({
name: true,
organizationId: true,
providerId: true,
isActive: true,
})
.extend({
// Override providerId to make it optional
providerId: z.string().uuid().optional(),
});
export const insertDnsRecordSchema = createInsertSchema(dnsRecords).pick({
domainId: true,