viewmodel
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -19,4 +19,2 @@ 'use strict'; | ||
index: 'context', | ||
prefix: '', | ||
ttl: 60 * 60 * 24 * 14, // 14 days | ||
pingInterval: 1000 | ||
@@ -138,3 +136,3 @@ }; | ||
type: self.collectionName, | ||
id: self.options.prefix + id | ||
id: id | ||
}, function (err, res) { | ||
@@ -276,4 +274,5 @@ if (err && err.message.toLowerCase().indexOf('not found') >= 0) { | ||
// Map to view models | ||
var vms = _.map(res.hits.hits, function(data) { | ||
var vm = new ViewModel(data._source, self); | ||
var vms = _.map(res.hits.hits, function(res) { | ||
var data = jsondate.parse(JSON.stringify(res._source)); | ||
var vm = new ViewModel(data, self); | ||
vm.actionOnCommit = 'update'; | ||
@@ -321,3 +320,3 @@ return vm; | ||
type: self.collectionName, | ||
id: self.options.prefix + vm.id, | ||
id: vm.id, | ||
refresh: true, | ||
@@ -345,3 +344,3 @@ body: obj | ||
refresh: true, | ||
id: self.options.prefix + vm.id | ||
id: vm.id | ||
}, function (err, res) { | ||
@@ -369,3 +368,3 @@ if (err && err.message.toLowerCase().indexOf('not found') >= 0) { | ||
type: self.collectionName, | ||
id: self.options.prefix + vm.id, | ||
id: vm.id, | ||
version: nextVersion - 1, | ||
@@ -372,0 +371,0 @@ refresh: true, |
{ | ||
"author": "adrai", | ||
"name": "viewmodel", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
## [v1.4.0](https://github.com/adrai/node-viewmodel/compare/v1.3.4...v1.4.0) | ||
## [v1.4.1](https://github.com/adrai/node-viewmodel/compare/v1.3.4...v1.4.1) | ||
- added elasticsearch support | ||
@@ -3,0 +3,0 @@ |
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
96601
2659