
Hey everyone, I'm learning how to use Appwrite and so far it's been going really well! I have a question though, say we have a function that is executed whenever a document is added to a collection.
If I wanted to update the value of one of that document's fields based on another of its fields, what would the best course of action be? I tried checking the "req" object's body and performing my conditional logic and it works like a charm, however when attempting to update my new value via databases.updateDocument it seems to do nothing.
I'm pasting my code below...
Thank you a lot!

You donβt seem to have authenticated to Appwrite anywhere here

You need to either use client.setKey()
to use server side functions with an API key, or client.setJWT()
to authenticate as a user (with a JWT you created on the client side).
Recommended threads
- Doing the React TMDB movies tutorial, is...
At the point where I created a brand new app on appwrite but cannot instantiate the react platform without cloning a whole other app and doing some ping button ...
- Is my approach for deleting registered u...
A few weeks ago, I was advised not to use the registered users' id in my web app. Instead, I store the publicly viewable information such as username and email ...
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
