i want to access some data when a user create a document and also when a user delete a document
when I log out this output log({"eventTriggered": JSON.stringify(req.body)}); i get the following
so now when i try to access the individual object let says postType it log out empty as though nothing is inside,
so i decided to use JSON.parse(req.body) i got the following errors
at JSON.parse (<anonymous>)
at Module.default (file:///usr/local/server/src/function/src/main.js:24:28)
at execute (/usr/local/server/src/server.js:141:48)
at async /usr/local/server/src/server.js:158:13```
Please, what i'm i doing wrong??
How are you trying to access the data?
i have resolved it
i change the JSON.stringify(req.body) to JSON.parse(req.bodyRaw) and it fixed it
[SOLVED] Can't Access Data in the response payload when Function is trigger
Recommended threads
- Dart runtime functions are timing out an...
My appwrite function is not executing at all and showing the error in error logs: I tried redeploying. Still no luck. I have set the function to ise maximum re...
- AppWrite OSS sponsorship
Hello I have applied for AppWrite OSS sponsorship about a month ago. I haven't received any email response so far. Can you you help me please? My email for appl...
- Cold start and deployment failed
It was working fine before, and I didn’t make any changes. It started showing a cold start error, so I tried redeploying, but the error is still there. Dart: s...