Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 Documentation: updateDocument example doesn't include data or permissions #636

Open
2 tasks done
Akash-152000 opened this issue Oct 8, 2023 · 6 comments
Open
2 tasks done
Labels
documentation Improvements or additions to documentation

Comments

@Akash-152000
Copy link

💭 Description

In updateDocument Method:

const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]');

above code should be updated to this:

const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]',{title,description});

which increases readability for the users, by reading this they would know they have to pass the object with attributes they want to update.

Click on the link to visit updateDocument() in documentation: Link

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@HeetVekariya
Copy link

If this is identified as valid by the repo maintainers, then i would like to work on this issue, can you please assign it to me.

@ddevilz
Copy link

ddevilz commented Oct 8, 2023

can you assign it to me?

@manish7017
Copy link

Can you please assign this issue to me? I would like to work on it.

@ItzNotABug
Copy link
Contributor

ItzNotABug commented Oct 10, 2023

Afaik, the method used for this is PATCH so it should actually be:

const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]',{'existingKey':'newValue'});

@stnguyen90 stnguyen90 changed the title 📚 Documentation: 📚 Documentation: updateDocument example doesn't include data or permissions Oct 10, 2023
@Salonikansal2
Copy link

Salonikansal2 commented Oct 16, 2023

THANKS for your suggestion . Just raised a pr please check @ItzNotABug

I kept in my mind your suggestion , i have closed my previous pr , please only consider the latest one pr.

@eldadfux eldadfux transferred this issue from appwrite/appwrite Feb 19, 2024
@eldadfux eldadfux added the documentation Improvements or additions to documentation label Feb 19, 2024
@eldadfux
Copy link
Member

We've decided to list all required and optional params in code examples which will solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

7 participants