mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
change getRecentPosts to take count
This commit is contained in:
@@ -296,8 +296,12 @@ SocketPosts.loadMoreUserPosts = function(socket, data, callback) {
|
||||
};
|
||||
|
||||
|
||||
SocketPosts.getRecentPosts = function(socket, term, callback) {
|
||||
posts.getRecentPosts(socket.uid, 0, 19, term, callback);
|
||||
SocketPosts.getRecentPosts = function(socket, data, callback) {
|
||||
if(!data || !data.count) {
|
||||
return callback(new Error('invalid data'));
|
||||
}
|
||||
|
||||
posts.getRecentPosts(socket.uid, 0, data.count - 1, data.term, callback);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user