sequelize-es-decorator
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -17,21 +17,23 @@ const methods = require('../config/constants').methods['sequelize']; | ||
options.keys.map(key => { | ||
body[key] = updatedEntry[key]; | ||
}); | ||
if (updatedEntry) { | ||
options.keys.map(key => { | ||
body[key] = updatedEntry[key]; | ||
}); | ||
client.index({ | ||
index: `${database}_${options.type}`, | ||
id: updatedEntry.id, | ||
type: 'doc', | ||
body | ||
}) | ||
.then(() => resolve(updated)) | ||
.catch(err => { | ||
globalOptions.handleError && globalOptions.handleError(err); | ||
if (globalOptions.softMode) { | ||
resolve(updated); | ||
} else { | ||
throw err; | ||
} | ||
}); | ||
client.index({ | ||
index: `${database}_${options.type}`, | ||
id: updatedEntry.id, | ||
type: 'doc', | ||
body | ||
}) | ||
.then(() => resolve(updated)) | ||
.catch(err => { | ||
globalOptions.handleError && globalOptions.handleError(err); | ||
if (globalOptions.softMode) { | ||
resolve(updated); | ||
} else { | ||
throw err; | ||
} | ||
}); | ||
} | ||
}); | ||
@@ -38,0 +40,0 @@ }); |
{ | ||
"name": "sequelize-es-decorator", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Decorator for Sequelize models that enables auto-indexing of data that goes through the model.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11966
202