diff --git a/index.js b/index.js index 7410361..46e95bb 100644 --- a/index.js +++ b/index.js @@ -815,9 +815,7 @@ app.all("*", async (req, res) => { if (routeMatch) { req.params = routeMatch.params; - const route = db - .prepare("SELECT * FROM routes WHERE id = ?") - .get(routeMatch.id); + const route = model.getRoute(routeMatch.id); const structure = model.getStructure(route.structure_id);