I have a function that takes inputs and depending on those inputs executes different methods. No matter what I set path1 to, it always returns the same value, which is whatever the value of path1 was when the server function was first executed.
For example, in the attachment - res.send(path1) always returns 63ac838005209fd1b692", even if i change path1 in the createExecution command.
This is resulting in the incorrect method being fired, as each method refers to a different database.
I have tried redeploying the function so am quite stumped as to what is happening.
You should be using req.variables
rather than process.env
. see https://appwrite.io/docs/functions#writingYourOwnFunction
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...