This commit is contained in:
Rizky 2024-02-08 08:18:08 +07:00
parent 3ad90bef6c
commit 35b9ef6599
1 changed files with 5 additions and 4 deletions

View File

@ -91,14 +91,14 @@ export const code_edit: SAction["code"]["edit"] = async function (
});
if (save_to === "comp" && comp_id) {
_db.component.update({
await _db.component.update({
where: { id: comp_id },
data: {
content_tree: root.toJSON(),
},
});
} else if (page_id && validate(page_id)) {
_db.page.update({
await _db.page.update({
where: { id: page_id },
data: {
content_tree: root.toJSON(),
@ -128,14 +128,14 @@ export const code_edit: SAction["code"]["edit"] = async function (
});
if (save_to === "comp" && comp_id) {
_db.component.update({
await _db.component.update({
where: { id: comp_id },
data: {
content_tree: root.toJSON(),
},
});
} else if (page_id && validate(page_id)) {
_db.page.update({
await _db.page.update({
where: { id: page_id },
data: {
content_tree: root.toJSON(),
@ -189,6 +189,7 @@ export const code_edit: SAction["code"]["edit"] = async function (
}
}
});
await _db.component.update({
where: { id: comp_id },
data: {