mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
added infinite load to user favourites page
This commit is contained in:
@@ -247,4 +247,15 @@ SocketPosts.flag = function(socket, pid, callback) {
|
||||
], callback);
|
||||
}
|
||||
|
||||
SocketPosts.loadMoreFavourites = function(socket, data, callback) {
|
||||
if(!data || !data.after) {
|
||||
return callback(new Error('invalid data'));
|
||||
}
|
||||
|
||||
var start = parseInt(data.after, 10),
|
||||
end = start + 9;
|
||||
|
||||
posts.getFavourites(socket.uid, start, end, callback);
|
||||
};
|
||||
|
||||
module.exports = SocketPosts;
|
||||
Reference in New Issue
Block a user