Back

can't delete an item

  • 0
  • Databases
  • Web
safwan
2 Apr, 2023, 10:12

so create, read and update work fine?

TL;DR
Issue: User is experiencing errors when trying to delete an item and is unsure if they need to remove 'async' and 'await' keywords from their code. Solution: The issue lies in the code provided, where the user tries to delete an item using a specific function. The user should check if the create, read, and update operations work fine, as mentioned. If so, the issue may be with the delete function itself. The user provides a repository link where the code snippet can be found to further investigate the problem.
safwan
2 Apr, 2023, 10:12

Can you show some code?

Ajay
2 Apr, 2023, 10:13

It's in the repo Ajay820

Ajay
2 Apr, 2023, 10:13

Yeah read is happening

Ajay
2 Apr, 2023, 10:14

Repo link

Ajay
2 Apr, 2023, 10:15

Didn't checked with update but create and read is happening

safwan
2 Apr, 2023, 10:17

where exactly in the repo are you doing this?

safwan
2 Apr, 2023, 10:17

Please post the link to a code snippet. Not a full repo

Ajay
2 Apr, 2023, 10:22

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() }

Ajay
2 Apr, 2023, 10:24

I think I have to remove async and await right

Ajay
2 Apr, 2023, 10:25
Ajay
2 Apr, 2023, 10:26

Is this right to authenticate with Google I am getting errors

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more