
Hello. I'm getting error below when trying to create a new document. I don't remember creating attribute "author", but it fits in the context of what I am doing. So it's possible that I added and then removed this attribute. Either way, it shouldn't exist by now, it doesn't show up in console as well. I attached the screenshots of console, error & my code.
Error: Invalid document structure: Missing required attribute "author"
My code:
await databases.createDocument("bible-assistant-db", "jwchat-threads", ID.unique(), {
chatName: message,
messages: [{
role: "USER",
content: [
{
type: "TEXT",
text: message,
},
...images.map((image: any) => {
return {
type: "IMAGE",
media_type: image.media_type,
data: image.data,
};
})
],
}],
isBusy: true
}, [Permission.read(Role.user(user.$id))]);
Recommended threads
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
- Realtime integration with SSR auth
Hey, I have a nextjs website with SSR auth, works great. I use a session client for user verification and an admin client with API key. Both is used with node-...
- Updating console to 1.8
Hey! Does anyone know how to update the appwrite console only? I am using console 1.7.4 but it has UI/UX issues 🙁
