mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
scroll to post 2
This commit is contained in:
16
src/posts.js
16
src/posts.js
@@ -57,14 +57,18 @@ var RDB = require('./redis.js'),
|
||||
|
||||
function getPostSummary(pid, callback) {
|
||||
Posts.getPostFields(pid, ['pid', 'tid', 'content', 'uid', 'timestamp', 'deleted'], function(postData) {
|
||||
Posts.addUserInfoToPost(postData, function() {
|
||||
if(postData.deleted === '1') {
|
||||
return;
|
||||
}
|
||||
|
||||
if(postData.deleted !== '1') {
|
||||
returnData.push(postData);
|
||||
}
|
||||
|
||||
callback(null);
|
||||
Posts.addUserInfoToPost(postData, function() {
|
||||
topics.getTopicField(postData.tid, 'slug', function(topicSlug) {
|
||||
postData.topicSlug = topicSlug;
|
||||
returnData.push(postData);
|
||||
callback(null);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user