testing sync

This commit is contained in:
Laurent Cozic committed 2017-06-18 00:49:52 +01:00
1 parent 06dc16bcb4
commit 2e8a56ad5e
13 files changed
+316 -243

No files matched your search

@@ -11,7 +11,7 @@ import { Registry } from 'src/registry.js';
class NoteFolderService extends BaseService {
static save(type, item, oldItem) {
static save(type, item, oldItem, options = null) {
let diff = null;
if (oldItem) {
diff = BaseModel.diffObjects(oldItem, item);
@@ -32,7 +32,9 @@ class NoteFolderService extends BaseService {
toSave.id = item.id;
}
return ItemClass.save(toSave).then((savedItem) => {
console.info(toSave);
return ItemClass.save(toSave, options).then((savedItem) => {
output = Object.assign(item, savedItem);
if (isNew && type == 'note') return Note.updateGeolocation(output.id);
}).then(() => {