fix breadcrumbs and home /api route not loading

This commit is contained in:
Baris Usakli
2017-11-15 14:48:28 -05:00
parent 6a623c30d7
commit 38e52a65be
6 changed files with 11 additions and 10 deletions

View File

@@ -64,8 +64,7 @@ unreadController.get = function (req, res, next) {
data.categories = results.watchedCategories.categories;
data.selectedCategory = results.watchedCategories.selectedCategory;
data.selectedCids = results.watchedCategories.selectedCids;
if (req.path.startsWith('/api/unread') || req.path.startsWith('/unread')) {
if (req.originalUrl.startsWith(nconf.get('relative_path') + '/api/unread') || req.originalUrl.startsWith(nconf.get('relative_path') + '/unread')) {
data.breadcrumbs = helpers.buildBreadcrumbs([{ text: '[[unread:title]]' }]);
}