Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var trySaveEventLocal = function(eventData) {
moesifController.createEvent(new moesifapi.EventModel(eventData), function(err) {
console.log('moesif API callback err=' + err);
if (err) {
console.log('moesif API failed with error.');
if (options.callback) {
options.callback(err, eventData);
}
} else {
console.log('moesif API succeeded');
if (options.callback) {
options.callback(null, eventData);
}
}
});
};