sequelize-es-decorator
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -34,7 +34,10 @@ const elasticsearch = require('@elastic/elasticsearch'); | ||
index: `${this.database}_${options.type}` | ||
}).then(status => { | ||
}).then(res => { | ||
const status = !(res.statusCode === 404); | ||
if (!status) { | ||
this.client.indices.create(this.indexSetting ? { | ||
index: `${this.database}_${options.type}`, | ||
body: this.indexSetting | ||
body: { | ||
settings: this.indexSetting | ||
} | ||
} : { | ||
@@ -41,0 +44,0 @@ index: `${this.database}_${options.type}` |
{ | ||
"name": "sequelize-es-decorator", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"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
9744
172