
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
- Appwrite custom domain verification fail...
So I've left enough time for the records to propagate and I've tried adding in a subdomain for the appwrite endpoint so as not to cause a clash with two CNAME r...
- Error: Invalid `userId` param: Parameter...
- Appwrite error handling
Is this a good way to handle appwrite errors in nextjs server action ??
