fix(core): fixed all res.send(message) of not found from db by id

This commit is contained in:
OldHawk
2018-01-21 16:27:17 +08:00
parent 6c07a86693
commit 2a995dcf18
11 changed files with 37 additions and 50 deletions

View File

@@ -1065,9 +1065,7 @@ exports.topicById = function (req, res, next, id) {
if (err) {
return next(err);
} else if (!topic) {
return res.status(404).send({
message: 'No topic with that identifier has been found'
});
return res.status(404).send();
}
req.topic = topic;
next();