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
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...
- Project Paused Despite Daily Active Usag...
I noticed that my project was automatically **paused**, even though it is actively being used. The project is an **attendance application** that is used daily b...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...