Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const insertData = (data, cb) => {
const processId = models.uuid();
data['id'] = _.toString(processId);
const batch = new models.instance.bulk_upload_process(data);
batch.save(err => {
if (err) {
cb(err, null);
} else {
cb(null, processId);
}
});
}