mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
if not term just use empty string
This commit is contained in:
@@ -740,11 +740,14 @@ var path = require('path'),
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/search/:term', function (req, res) {
|
app.get('/search/:term?', function (req, res) {
|
||||||
|
|
||||||
if (!req.user && meta.config.allowGuestSearching !== '1') {
|
if (!req.user && meta.config.allowGuestSearching !== '1') {
|
||||||
return res.redirect('/403');
|
return res.redirect('/403');
|
||||||
}
|
}
|
||||||
|
if(!req.params.term) {
|
||||||
|
req.params.term = '';
|
||||||
|
}
|
||||||
app.build_header({
|
app.build_header({
|
||||||
req: req,
|
req: req,
|
||||||
res: res
|
res: res
|
||||||
|
|||||||
Reference in New Issue
Block a user