7 lines
313 B
JavaScript
7 lines
313 B
JavaScript
function handler(req, res) {
|
|
const sql = require("db")("bliss").sql;
|
|
const kind = "route";
|
|
const artifact = sql.prepare("SELECT * FROM routes WHERE id = ?").get(req.params.id);
|
|
if (!artifact) return res.status(404).send("Route not found");
|
|
res.render("inspector/artifact_editor", { kind, artifact });
|
|
}
|