fix: Remove breaking requirement to not pass collectionId with parentDocumentId.

This was regressed as part of 95b9453269 and unfortunately is a breaking change for API consumers
This commit is contained in:
Tom Moor
2024-06-21 20:34:31 -04:00
parent f17ce9d50b
commit 5ddc36555d
2 changed files with 0 additions and 23 deletions

View File

@@ -348,9 +348,6 @@ export const DocumentsCreateSchema = BaseSchema.extend({
template: z.boolean().optional(),
}),
})
.refine((req) => !req.body.parentDocumentId || !req.body.collectionId, {
message: "collectionId is inferred when creating a nested document",
})
.refine((req) => !(req.body.template && !req.body.collectionId), {
message: "collectionId is required to create a template document",
})