Events.js - wixEvents_onRsvpCreated - Not Working

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

Hi Rajjat,
Are you still seeing this error? We just resolved some issues with backend APIs, so this should be fixed now… Let me know.

Hi, Yes it’s working now. I tried a lot even I know code was working. But finally, good to hear something positive. Thanks for the help!