mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-24 11:18:48 +02:00
Fix optional() type errors
This commit is contained in:
@@ -816,25 +816,20 @@ export const ConfigSchema = z
|
|||||||
.object({
|
.object({
|
||||||
"proxy-resources": z
|
"proxy-resources": z
|
||||||
.record(z.string(), PublicResourceSchema)
|
.record(z.string(), PublicResourceSchema)
|
||||||
.optional()
|
|
||||||
.prefault({}),
|
.prefault({}),
|
||||||
"public-resources": z
|
"public-resources": z
|
||||||
.record(z.string(), PublicResourceSchema)
|
.record(z.string(), PublicResourceSchema)
|
||||||
.optional()
|
|
||||||
.prefault({}),
|
.prefault({}),
|
||||||
"client-resources": z
|
"client-resources": z
|
||||||
.record(z.string(), PrivateResourceSchema)
|
.record(z.string(), PrivateResourceSchema)
|
||||||
.optional()
|
|
||||||
.prefault({}),
|
.prefault({}),
|
||||||
"private-resources": z
|
"private-resources": z
|
||||||
.record(z.string(), PrivateResourceSchema)
|
.record(z.string(), PrivateResourceSchema)
|
||||||
.optional()
|
|
||||||
.prefault({}),
|
.prefault({}),
|
||||||
"public-policies": z
|
"public-policies": z
|
||||||
.record(z.string(), ResourcePolicySchema)
|
.record(z.string(), ResourcePolicySchema)
|
||||||
.optional()
|
|
||||||
.prefault({}),
|
.prefault({}),
|
||||||
sites: z.record(z.string(), SiteSchema).optional().prefault({})
|
sites: z.record(z.string(), SiteSchema).prefault({})
|
||||||
})
|
})
|
||||||
.transform((data) => {
|
.transform((data) => {
|
||||||
// Merge public-resources into proxy-resources
|
// Merge public-resources into proxy-resources
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ export const configSchema = z
|
|||||||
maxmind_db_path: z.string().optional(),
|
maxmind_db_path: z.string().optional(),
|
||||||
maxmind_asn_path: z.string().optional()
|
maxmind_asn_path: z.string().optional()
|
||||||
})
|
})
|
||||||
.optional()
|
|
||||||
.prefault({}),
|
.prefault({}),
|
||||||
postgres: z
|
postgres: z
|
||||||
.object({
|
.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user