fix: logs bug where it was repeating due to flaw in most recent id query

This commit is contained in:
HRG @ SCExC 2025-01-09 15:59:21 -05:00
parent 7a5a1a5e9d
commit 38b9c0e538
4 changed files with 36 additions and 31 deletions

View file

@ -571,10 +571,11 @@ app.get("/workshop/:structure_id/route/:route_id/logs", (req, res) => {
const lastId = model.getMostRecentLogIdByRoute(db, req.params.route_id);
console.log(since, logs, lastId)
return res.send(
bootstrapTemplateWithHTMXetc(
eta.render("workshop/logs", {
logs: logs.reverse(),
logs: logs,
structId: req.params.structure_id,
routeId: req.params.route_id,
since: lastId,