mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +00:00
[Persistence] Rewrite failure handling
Rewrite the overwrite behavior (for Overwrite/Cancel of rejected persisted attempts) to utilize simpler API. WTD-1033.
This commit is contained in:
@ -155,12 +155,11 @@ define(
|
||||
* of the success (true) or failure (false) of this
|
||||
* operation
|
||||
*/
|
||||
updateObject: function (space, key, value, options) {
|
||||
var check = (options || {}).check;
|
||||
updateObject: function (space, key, value) {
|
||||
function checkUpdate(response) {
|
||||
return checkResponse(response, key);
|
||||
}
|
||||
return put(key, value, check && { version: revs[key] })
|
||||
return put(key, value, { version: revs[key] })
|
||||
.then(checkUpdate);
|
||||
},
|
||||
/**
|
||||
|
Reference in New Issue
Block a user