Hey @franva,
Debugging your code is a bit beyond what we’re able to offer in this forum, but one way to test that the connection between your site and your function is working would be to deploy a simple logging function like:
// does-it-work.js
exports.handler = async function(event, context) {
console.log(JSON.parse(event.body))
return {
status: 200
};
};
and then hit the function endpoint. You should see the event log there. Let us know if that’s not the case!
For Netlify and Fauna DB together, there’s a nice (if a little outdated) demo here: