[Persistence] Remove persistence usage from AbstractStartTimerAction
This commit is contained in:
@@ -51,17 +51,11 @@ define(
|
|||||||
var domainObject = this.domainObject,
|
var domainObject = this.domainObject,
|
||||||
now = this.now;
|
now = this.now;
|
||||||
|
|
||||||
function doPersist() {
|
|
||||||
var persistence = domainObject.getCapability('persistence');
|
|
||||||
return persistence && persistence.persist();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setTimestamp(model) {
|
function setTimestamp(model) {
|
||||||
model.timestamp = now();
|
model.timestamp = now();
|
||||||
}
|
}
|
||||||
|
|
||||||
return domainObject.useCapability('mutation', setTimestamp)
|
return domainObject.useCapability('mutation', setTimestamp);
|
||||||
.then(doPersist);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return AbstractStartTimerAction;
|
return AbstractStartTimerAction;
|
||||||
|
|||||||
Reference in New Issue
Block a user