React Developer
Hi! So I'm trying to generate a new document through a api call and get the error "The document data is missing" when my collection does not required any of the attributes to generate a new one. My method is
export const createEmptyCarSetup = async () => {
try {
const newEmptyCarSetup = await databases.createDocument(
databaseId,
carSetupCollectionId,
ID.unique(),
{}
)
return newEmptyCarSetup
} catch (error) {
throw new Error(error)
}
}
Am I missing something or is this not the way the wiki mentions how to create default documents? https://appwrite.io/docs/references/cloud/server-nodejs/databases