in app/src/app/pages/document/document.component.ts [51:66]
editDocument(json) {
const partial = false;
const newId = json && json._id && json._id.$value;
const oldId = this.item && this.item._id && this.item._id.$value;
if (newId !== oldId) {
this.notifService.notifyError("ObjectId changed. This is not supported, updated canceled.");
return ;
}
this.loading = true;
this.mongodb.update(this.server, this.database, this.collection, oldId, json, partial)
.subscribe((res: any) => {
this.loading = false;
this.item = res.update;
});
}