mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
resolve method name collision, getPostsFromSet -> getPostSummariesFromSet
This commit is contained in:
@@ -155,7 +155,7 @@ accountsController.getAccount = function(req, res, next) {
|
|||||||
user.isFollowing(req.uid, userData.theirid, next);
|
user.isFollowing(req.uid, userData.theirid, next);
|
||||||
},
|
},
|
||||||
posts: function(next) {
|
posts: function(next) {
|
||||||
posts.getPostsFromSet('uid:' + userData.theirid + ':posts', req.uid, 0, 9, next);
|
posts.getPostSummariesFromSet('uid:' + userData.theirid + ':posts', req.uid, 0, 9, next);
|
||||||
},
|
},
|
||||||
signature: function(next) {
|
signature: function(next) {
|
||||||
posts.parseSignature(userData, req.uid, next);
|
posts.parseSignature(userData, req.uid, next);
|
||||||
@@ -229,11 +229,11 @@ function getFollow(tpl, name, req, res, next) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
accountsController.getFavourites = function(req, res, next) {
|
accountsController.getFavourites = function(req, res, next) {
|
||||||
getFromUserSet('account/favourites', 'favourites', posts.getPostsFromSet, 'posts', req, res, next);
|
getFromUserSet('account/favourites', 'favourites', posts.getPostSummariesFromSet, 'posts', req, res, next);
|
||||||
};
|
};
|
||||||
|
|
||||||
accountsController.getPosts = function(req, res, next) {
|
accountsController.getPosts = function(req, res, next) {
|
||||||
getFromUserSet('account/posts', 'posts', posts.getPostsFromSet, 'posts', req, res, next);
|
getFromUserSet('account/posts', 'posts', posts.getPostSummariesFromSet, 'posts', req, res, next);
|
||||||
};
|
};
|
||||||
|
|
||||||
accountsController.getWatchedTopics = function(req, res, next) {
|
accountsController.getWatchedTopics = function(req, res, next) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ var async = require('async'),
|
|||||||
], callback);
|
], callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
Posts.getPostsFromSet = function(set, uid, start, stop, callback) {
|
Posts.getPostSummariesFromSet = function(set, uid, start, stop, callback) {
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function(next) {
|
function(next) {
|
||||||
db.getSortedSetRevRange(set, start, stop, next);
|
db.getSortedSetRevRange(set, start, stop, next);
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ function loadMorePosts(set, uid, data, callback) {
|
|||||||
var start = Math.max(0, parseInt(data.after, 10)),
|
var start = Math.max(0, parseInt(data.after, 10)),
|
||||||
stop = start + 9;
|
stop = start + 9;
|
||||||
|
|
||||||
posts.getPostsFromSet(set, uid, start, stop, callback);
|
posts.getPostSummariesFromSet(set, uid, start, stop, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
SocketPosts.getRecentPosts = function(socket, data, callback) {
|
SocketPosts.getRecentPosts = function(socket, data, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user