mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
check if topicData is valid
This commit is contained in:
@@ -224,8 +224,10 @@ var express = require('express'),
|
|||||||
async.waterfall([
|
async.waterfall([
|
||||||
function(next) {
|
function(next) {
|
||||||
topics.getTopicWithPosts(tid, ((req.user) ? req.user.uid : 0), function(err, topicData) {
|
topics.getTopicWithPosts(tid, ((req.user) ? req.user.uid : 0), function(err, topicData) {
|
||||||
|
if(topicData) {
|
||||||
if(topicData.deleted === '1' && topicData.expose_tools === 0)
|
if(topicData.deleted === '1' && topicData.expose_tools === 0)
|
||||||
return next(new Error('Topic deleted'), null);
|
return next(new Error('Topic deleted'), null);
|
||||||
|
}
|
||||||
|
|
||||||
next(err, topicData);
|
next(err, topicData);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user