mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
closes #5510
This commit is contained in:
@@ -146,6 +146,24 @@ topicsController.get = function (req, res, callback) {
|
||||
next(null, data.topicData);
|
||||
});
|
||||
},
|
||||
function (topicData, next) {
|
||||
if (!topicData.deleterUid) {
|
||||
return next(null, topicData);
|
||||
}
|
||||
|
||||
user.getUserFields(topicData.deleterUid, ['username', 'userslug'], function(err, deleter) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
topicData.deleter = deleter;
|
||||
topicData.deleter.timestampISO = topicData.deletedTimestampISO
|
||||
delete topicData.deleterUid;
|
||||
delete topicData.deletedTimestampISO;
|
||||
|
||||
next(null, topicData);
|
||||
});
|
||||
},
|
||||
function (topicData, next) {
|
||||
function findPost(index) {
|
||||
for (var i = 0; i < topicData.posts.length; i += 1) {
|
||||
|
||||
Reference in New Issue
Block a user