const deleteasync = async (id) =>{ console.log(id) const response = await databases.deleteDocument("6427c6d20464df58bf36","6427c6dcd6bc73a91b81","id") response.then( function (response){ console.log(response) }, function (error){ console.log(error) } ) window.location.reload() }
The error is can't find document id
are you passing the document id or just 'id' as the last argument?
Should be like - databases.deleteDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]');
It is a document id I am passing the id through click
Basically it's an react app
should it be inside " " then if its a variable? 👀
It should be const response = await databases.deleteDocument("6427c6d20464df58bf36", "6427c6dcd6bc73a91b81", id);, I guess.
Ok will try this also
Recommended threads
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Appwrite console is too heavy
The Appwrite console is too heavy And all of my services broken Any support , please
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...