if category doesn't exist return null and 404
This commit is contained in:
Barış Soner Uşaklı
2018-12-01 17:15:38 -05:00
parent ec0c50d4e0
commit a63ddbe2aa
4 changed files with 22 additions and 5 deletions

View File

@@ -103,6 +103,9 @@ categoryController.get = function (req, res, callback) {
}, next);
},
function (categoryData, next) {
if (!categoryData) {
return callback();
}
categories.modifyTopicsByPrivilege(categoryData.topics, userPrivileges);
if (categoryData.link) {