mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
full text search using reds, issue #142
This commit is contained in:
@@ -382,6 +382,18 @@ var express = require('express'),
|
||||
res.redirect(global.nconf.get('relative_path') + '/404');
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/search', function(req, res) {
|
||||
app.build_header({ req: req, res: res }, function(err, header) {
|
||||
res.send(header + app.create_route("search", null, "search") + templates['footer']);
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/search/:term', function(req, res) {
|
||||
app.build_header({ req: req, res: res }, function(err, header) {
|
||||
res.send(header + app.create_route("search/"+req.params.term, null, "search") + templates['footer']);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}(WebServer));
|
||||
|
Reference in New Issue
Block a user