0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-03 22:29:08 -05:00

fix: bad collectionSchema data type

This commit is contained in:
bholmesdev 2024-01-11 15:39:50 -05:00 committed by Nate Moore
parent 4633d37f8c
commit 6ad4e00cd0

View file

@ -52,7 +52,10 @@ const fieldsSchema = z.record(fieldSchema);
export const collectionSchema = z.object({
fields: fieldsSchema,
data: z.function().returns(fieldsSchema).optional(),
data: z
.function()
.returns(z.array(z.record(z.unknown())))
.optional(),
});
export const collectionsSchema = z.record(collectionSchema);