Handle erroneous searches
This commit is contained in:
parent
74f5b36b4b
commit
4c6644b3d6
1 changed files with 1 additions and 2 deletions
|
@ -44,13 +44,12 @@ module.exports = function(req, res, next) {
|
||||||
req.flash('search-error', 'No match found for this link');
|
req.flash('search-error', 'No match found for this link');
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!searching) {
|
if (url.host && !searching) {
|
||||||
req.flash('search-error', 'No match found for this link');
|
req.flash('search-error', 'No match found for this link');
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue