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
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...