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
- Rate límit reset
I've made an error in the code by not setting a limit on how much rows should i get per request because i was working with a small db for testing. Last night Iv...
- I reached my budget limit how?
Hi, I got a message saying I reached my budget limit already? Makes no sense? In 4 days I reached 3.4M reads in a project how with only 100 users? This is my pr...
- Console down yet again ?
Seeing it stuck on the "loading" screen yet again ... second time today. (last time 10+ hours ago). 'roles' and 'plan' requests just hung. Meanwhile, appwrit...