Hi, I’m trying to inserting the event data to the database when a visitor/member fills the rsvp form (default Wix event box). So, I’m using the backend function wixEvents_onRsvpCreated in the events.js file located under backend tab.
I copied some default event object to test the code, it’s inserting perfectly in the preview mode. Means insert has no errors.
But when I go live, nothing happens. I’ve taken the log screen shot & is attached below.
Code
import wixData from 'wix-data';
export async function wixEvents_onRsvpCreated(event) {
let options = {
"suppressAuth": true,
"suppressHooks": true
};
let myFullData = {"email": event.email};
await wixData.insert("rsvpDetails", myFullData, options)
}
Error