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:
@@ -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",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user