mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
closed #292
This commit is contained in:
@@ -110,10 +110,12 @@ var user = require('./../user.js'),
|
||||
app.get('/api/topic/:id/:slug?', function(req, res, next) {
|
||||
var uid = (req.user) ? req.user.uid : 0;
|
||||
topics.getTopicWithPosts(req.params.id, uid, 0, 10, function(err, data) {
|
||||
if(data.deleted === '1' && data.expose_tools === 0) {
|
||||
return res.json(404, {});
|
||||
}
|
||||
res.json(data);
|
||||
if (!err) {
|
||||
if(data.deleted === '1' && data.expose_tools === 0) {
|
||||
return res.json(404, {});
|
||||
}
|
||||
res.json(data);
|
||||
} else res.json(404, {});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user