fafa
Heyo,
I'm getting Invalid document structure: Unknown attribute: "data"
in my function, using this as my code:
TypeScript
const response = await databases.createDocument(
'hp_db',
'userdata',
document.$id,
{
data: {
status: "I'm new here!",
profileUrl: document.$id,
username: document.name,
},
permissions: [
`read(\"user:${document.$id}\")`,
`update(\"user:${document.$id}\")`,
`delete(\"user:${document.$id}\")`,
],
}
);
Am I missing something? Creating it using an API Key
TL;DR
Issue with document creation function due to an attribute error 'data'. Check if the database supports the 'data' attribute. Also, ensure correct API Key usage for document creation. Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...