Skip to content

Node.js based forum software built for the modern web

resolve method name collision, getPostsFromSet -> getPostSummariesFromSet

barisusaklidce9a19882f2
diff --git a/src/controllers/accounts.js b/src/controllers/accounts.js
index e8071ec8ad..cb769fd634 100644
--- a/src/controllers/accounts.js
+++ b/src/controllers/accounts.js
@@ -155,7 +155,7 @@ accountsController.getAccount = function(req, res, next) {
user.isFollowing(req.uid, userData.theirid, 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) {
posts.parseSignature(userData, req.uid, next);
@@ -229,11 +229,11 @@ function getFollow(tpl, name, 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) {
- 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) {
diff --git a/src/posts.js b/src/posts.js
index bea7b6673f..82be31fea0 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -73,7 +73,7 @@ var async = require('async'),
], callback);
};
- Posts.getPostsFromSet = function(set, uid, start, stop, callback) {
+ Posts.getPostSummariesFromSet = function(set, uid, start, stop, callback) {
async.waterfall([
function(next) {
db.getSortedSetRevRange(set, start, stop, next);
diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js
index 14b294da39..ae45e46b8e 100644
--- a/src/socket.io/posts.js
+++ b/src/socket.io/posts.js
@@ -538,7 +538,7 @@ function loadMorePosts(set, uid, data, callback) {
var start = Math.max(0, parseInt(data.after, 10)),
stop = start + 9;
- posts.getPostsFromSet(set, uid, start, stop, callback);
+ posts.getPostSummariesFromSet(set, uid, start, stop, callback);
}
SocketPosts.getRecentPosts = function(socket, data, callback) {