From ce83e5a71dc86f74b4aacf3f3e47e45735fc17b3 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Sep 2026 14:44:42 +0800 Subject: [PATCH] =?utf8?q?=E5=90=8E=E7=AB=AFsites=E5=A2=9E=E5=8A=A0app=5Fn?= =?utf8?q?ame/app=5Ficon/app=5Ficon=5Ffilename=E5=AD=97=E6=AE=B5=E6=94=AF?= =?utf8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- db-sidecar.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/db-sidecar.mjs b/db-sidecar.mjs index f8732e2..8ae8bff 100644 --- a/db-sidecar.mjs +++ b/db-sidecar.mjs @@ -386,6 +386,9 @@ function ensureColumn(table, column, def) { ensureColumn("cubes", "prompt", "TEXT"); ensureColumn("sites", "style_id", "INTEGER"); ensureColumn("sites", "parent_id", "INTEGER"); +ensureColumn("sites", "app_name", "TEXT"); +ensureColumn("sites", "app_icon", "TEXT"); +ensureColumn("sites", "app_icon_filename", "TEXT"); ensureColumn("domain_templates", "supplement", "TEXT"); ensureColumn("domain_templates", "style_id", "INTEGER"); ensureColumn("domain_pages", "status", "TEXT DEFAULT 'pending'"); @@ -2648,10 +2651,12 @@ async function route(req, res) { } if (req.method === "PUT") { const body = await parseBody(req); - db.prepare("UPDATE sites SET name=?, domain=?, description=?, supplement=?, style_id=?, parent_id=?, updated_at=CURRENT_TIMESTAMP WHERE id=?").run( + db.prepare("UPDATE sites SET name=?, domain=?, description=?, supplement=?, style_id=?, parent_id=?, app_name=?, app_icon=?, app_icon_filename=?, updated_at=CURRENT_TIMESTAMP WHERE id=?").run( body.name ?? "", body.domain ?? "", body.description ?? "", body.supplement ?? "", body.style_id != null ? Number(body.style_id) : null, - body.parent_id != null ? Number(body.parent_id) : null, siteId + body.parent_id != null ? Number(body.parent_id) : null, + body.app_name ?? null, body.app_icon ?? null, body.app_icon_filename ?? null, + siteId ); return respondJson(res, 200, hydrateSite(siteId)); } -- 2.43.0