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

doc: Added await to cookies().get() promise #1365

Merged

Conversation

hefler
Copy link
Contributor

@hefler hefler commented Sep 19, 2024

What does this PR do?

cookies().get() is an asynchronous function. Adding await to the sample code ensures that the cookie is read prior to moving to the next instructions. Not handling this as a promise makes it prone for the code to not run as intended and hard to debug.

Test Plan

Not needed, sample code just follows the standards https://wicg.github.io/cookie-store/#CookieStore-get

Related PRs and Issues

Fixes #1364

Have you read the Contributing Guidelines on issues?

Yes

@loks0n loks0n merged commit ca4b974 into appwrite:main Dec 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📚 Documentation: add await to cookies().get() as it returns a promise next.js-ssr-auth demo
2 participants