diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-08 02:52:19 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-08 02:56:41 +0100 |
| commit | 192abb9db60f95968953b515ce18700c6b2da090 (patch) | |
| tree | e0e77c935ad95ca9e641c6a1f19a22556df9b8d2 /bucky/app/router.js | |
| parent | bbbd8bbab8737f5067c85376daf79cd8a5a9c4cb (diff) | |
snippets and middleware
Diffstat (limited to 'bucky/app/router.js')
| -rw-r--r-- | bucky/app/router.js | 9 |
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, |
