[Build] Remove apparent strict violations

...from persistence providers.
This commit is contained in:
Victor Woeltjen
2016-03-04 11:18:25 -08:00
parent 9526207af8
commit 19c9fcd369
2 changed files with 14 additions and 13 deletions

View File

@ -108,14 +108,14 @@ define(
};
// Get a domain object model out of ElasticSearch's response
function getModel(response) {
ElasticPersistenceProvider.prototype.getModel = function (response) {
if (response && response[SRC]) {
this.revs[response[ID]] = response[REV];
return response[SRC];
} else {
return undefined;
}
}
};
// Check the response to a create/update/delete request;
// track the rev if it's valid, otherwise return false to
@ -145,15 +145,16 @@ define(
};
ElasticPersistenceProvider.prototype.readObject = function (space, key) {
return this.get(key).then(bind(getModel, this));
return this.get(key).then(bind(this.getModel, this));
};
ElasticPersistenceProvider.prototype.updateObject = function (space, key, value) {
var self = this;
function checkUpdate(response) {
return this.checkResponse(response, key);
return self.checkResponse(response, key);
}
return this.put(key, value, { version: this.revs[key] })
.then(bind(checkUpdate, this));
.then(checkUpdate);
};
ElasticPersistenceProvider.prototype.deleteObject = function (space, key, value) {