summaryrefslogtreecommitdiff
path: root/bucky
diff options
context:
space:
mode:
Diffstat (limited to 'bucky')
-rw-r--r--bucky/app/router.js6
-rw-r--r--bucky/search/search.js1
2 files changed, 6 insertions, 1 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index a793192..4f4396f 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -26,6 +26,12 @@ module.exports = function(app){
hoot_text: fortune("hoots"),
})
})
+ app.get("/index/:keyword", middleware.ensureAuthenticated, function(req, res){
+ res.render("pages/index", {
+ title: fortune("titles"),
+ hoot_text: fortune("hoots"),
+ })
+ })
app.get("/details/:id", middleware.ensureAuthenticated, function(req, res){
res.render("pages/details", {})
})
diff --git a/bucky/search/search.js b/bucky/search/search.js
index 6e1fd01..1236a4c 100644
--- a/bucky/search/search.js
+++ b/bucky/search/search.js
@@ -4,7 +4,6 @@ var STOPWORDS = require('./stopwords')
var wordRegexp = new RegExp("[^a-z0-9]+", 'g');
function parse_terms (s) {
-console.log(s, wordRegexp)
return s.toLowerCase().split(wordRegexp).filter((term) => !!term)
}
function cmp (a,b){ return (a<b)?-1:(a===b)?0:1 }