
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
- When connecting to VCS (Version Control ...
Hello, when I try to define in my function the root path of a function I get this when I click "Update".
- queries.map is not a function
Query.createdBefore doesnt work ``` tables.updateRows({ databaseId: process.env.APPWRITE_DATABASE_ID, tableId: process.env.APPWRITE_TABLE_ID, ...
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
