fix: restore inspector template hot reload

This commit is contained in:
Your Name 2026-08-06 16:37:42 -04:00
parent cbbb87cd2e
commit ffba038b35
7 changed files with 232 additions and 35 deletions

View file

@ -1,8 +1,7 @@
function handler(req, res) {
const sql = require("db")("bliss").sql;
const sourceTemplate = sql
.prepare("SELECT * FROM templates WHERE id = ?")
.get(req.params.id);
if (!sourceTemplate) return res.status(404).send("Template not found");
res.render("inspector/template_editor", { sourceTemplate });
const kind = "template";
const artifact = sql.prepare("SELECT * FROM templates WHERE id = ?").get(req.params.id);
if (!artifact) return res.status(404).send("Template not found");
res.render("inspector/artifact_editor", { kind, artifact });
}