summaryrefslogtreecommitdiff
path: root/bucky/app/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app/router.js')
-rw-r--r--bucky/app/router.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index c3af565..a87e1ec 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -4,6 +4,7 @@ var fortune = require('./fortune')
var bucky = require('./bucky')
var db = require('./db')
var util = require('./util')
+var search = require('../search/middleware')
module.exports = function(app){
app.all('*', middleware.ensureLocals)
@@ -91,6 +92,14 @@ module.exports = function(app){
// delete a comment
})
+ app.get("/api/search",
+ middleware.ensureAuthenticated,
+ search.search,
+ search.getComments,
+ search.getFiles,
+ search.logQuery,
+ search.success
+ )
app.get("/api/keyword/:keyword",
middleware.ensureAuthenticated,