appwrite / website

The Appwrite website, docs and blog 🏠
https://appwrite.io
216 stars 206 forks source link

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

Open hefler opened 2 months ago

hefler commented 2 months ago

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

coolify-appwrite-org[bot] commented 2 months ago

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-11-13 10:32:29 CET