diff --git a/app/srv/ws/edit/action/diff-local.ts b/app/srv/ws/edit/action/diff-local.ts index 4c1dc551..a17335ee 100644 --- a/app/srv/ws/edit/action/diff-local.ts +++ b/app/srv/ws/edit/action/diff-local.ts @@ -31,13 +31,13 @@ export const diffLocal = (ws: any, msg: any) => { if (msg.id) { const page = eg.edit.page[msg.id].doc.getMap("map").toJSON(); try { - await db.page.update({ - where: { id: page.id }, - data: { - content_tree: page.content_tree, - updated_at: new Date(), - }, - }); + // await db.page.update({ + // where: { id: page.id }, + // data: { + // content_tree: page.content_tree, + // updated_at: new Date(), + // }, + // }); resolve(); } catch (e) { console.error(e); @@ -50,17 +50,17 @@ export const diffLocal = (ws: any, msg: any) => { }, 1500); } else if (msg.mode === "comp") { eg.edit.comp[msg.id].saveTimeout = setTimeout(async () => { - const comp = eg.edit.comp[msg.id].doc.getMap("map").toJSON(); - await db.component.update({ - where: { - id: msg.id, - }, - data: { - name: comp.name, - content_tree: comp.content_tree, - updated_at: new Date(), - }, - }); + // const comp = eg.edit.comp[msg.id].doc.getMap("map").toJSON(); + // await db.component.update({ + // where: { + // id: msg.id, + // }, + // data: { + // name: comp.name, + // content_tree: comp.content_tree, + // updated_at: new Date(), + // }, + // }); }, 1500); } else if (msg.mode === "site") { clearTimeout(eg.edit.site[msg.id].saveTimeout); diff --git a/app/srv/ws/sync/actions/yjs_diff_local.ts b/app/srv/ws/sync/actions/yjs_diff_local.ts index 2a8933d5..dda8ea46 100644 --- a/app/srv/ws/sync/actions/yjs_diff_local.ts +++ b/app/srv/ws/sync/actions/yjs_diff_local.ts @@ -23,19 +23,19 @@ export const yjs_diff_local: SAction["yjs"]["diff_local"] = async function ( const root = doc.getMap("map").get("root") as any; if (root) { if (mode === "page") { - await db.page.update({ - where: { id }, - data: { - content_tree: root.toJSON(), - }, - }); + // await db.page.update({ + // where: { id }, + // data: { + // content_tree: root.toJSON(), + // }, + // }); } else if (mode === "comp") { - await db.component.update({ - where: { id }, - data: { - content_tree: root.toJSON(), - }, - }); + // await db.component.update({ + // where: { id }, + // data: { + // content_tree: root.toJSON(), + // }, + // }); } } }