Fix widget reply notification effects

This commit is contained in:
rajchales-monito
2026-07-24 14:29:03 +02:00
parent a3fc001b40
commit 04529d2df3
2 changed files with 75 additions and 17 deletions
+4 -1
View File
@@ -56,7 +56,10 @@ async function route(req, res) {
if (req.method === "GET" && url.pathname === "/admin") return file(res, path.join(PUBLIC_DIR, "admin.html"), "text/html; charset=utf-8");
if (req.method === "GET" && url.pathname === "/preview") return file(res, path.join(PUBLIC_DIR, "preview.html"), "text/html; charset=utf-8");
if (req.method === "GET" && url.pathname.startsWith("/uploads/")) return serveUpload(res, url.pathname);
if (req.method === "GET" && url.pathname === "/widget.js") return file(res, path.join(PUBLIC_DIR, "widget.js"), "application/javascript; charset=utf-8");
if (req.method === "GET" && url.pathname === "/widget.js") {
res.setHeader("Cache-Control", "no-store, max-age=0");
return file(res, path.join(PUBLIC_DIR, "widget.js"), "application/javascript; charset=utf-8");
}
if (req.method === "GET" && url.pathname.startsWith("/admin.")) return servePublic(res, url.pathname);
if (url.pathname === "/api/admin/login" && req.method === "POST") return adminLogin(req, res);