From 8326c223ab58547eaa3628917ca58e97ccf5e481 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 11 Oct 2013 14:57:17 -0400 Subject: [PATCH] fixed f5 bug with /recent/:term which previously gave a 404 --- src/webserver.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/webserver.js b/src/webserver.js index e03e3382df..2860aedef6 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -488,6 +488,17 @@ var express = require('express'), }); }); + app.get('/recent/:term?', function (req, res) { + // TODO consolidate with /recent route as well -> that can be combined into this area. See "Basic Routes" near top. + app.build_header({ + req: req, + res: res + }, function (err, header) { + res.send(header + app.create_route("recent/" + req.params.term, null, "recent") + templates['footer']); + }); + + }); + app.get('/pid/:pid', function (req, res) { posts.getPostData(req.params.pid, function (data) { if (data)