Hello Beautiful People,
I'm working on a feature where I need to execute certain actions in a function when a user account is deleted. This function would ideally be triggered by the account deletion event in Appwrite.
My key question is: Does Appwrite pass any specific data (like userID or other identifiers) to the function when it is triggered by an account deletion event? If so, how can I capture and utilize this data within my function?
I'm specifically looking to understand:
- The nature of the data passed to the function on such an event.
- The method or syntax for accessing this data within the function. Any guidance, code snippets, or pointers to relevant documentation would be immensely helpful.
Thank you for your assistance!
Got the solution. The users id can be accessed through the request object passed by the event through JSON.stringify(req.body)
yes, the body always contains the payload of the event. so, if you have a function that triggers on document update, the body would be the updated document.
In addition, the headers have some additional info too, such as who triggered the function: https://appwrite.io/docs/products/functions/development#headers
Recommended threads
- DeploymentStatus enum value `canceled` m...
Hey, Sorry if it has been reported already, I found an issue using the Dart SDK where the `canceled` enum value is missing from `DeploymentStatus`. This causes...
- Synchronous function execution timeout w...
I am calling server functions with xasync = true and I still get this error message. Synchronous function execution timed out. Use asynchronous execution inste...
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?