Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default async function runEvent () {
// Create the ActionRecord instance
const actionRecord = new ActionRecord()
// Register the models, setting actionRecord.models
await registerModels(actionRecord)
// Find the event function
const eventFn = findEventFunction(context.eventName)
if (eventFn) {
// Run it
return eventFn(actionRecord)
}
}