mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
camelCased get_latest_undeleted_pid method
This commit is contained in:
@@ -128,7 +128,7 @@ var RDB = require('./redis.js'),
|
||||
});
|
||||
|
||||
// Delete the thread if it is the last undeleted post
|
||||
threadTools.get_latest_undeleted_pid(postData.tid, function(err, pid) {
|
||||
threadTools.getLatestUndeletedPid(postData.tid, function(err, pid) {
|
||||
if (err && err.message === 'no-undeleted-pids-found') {
|
||||
threadTools.delete(postData.tid, -1, function(err) {
|
||||
if (err) winston.error('Could not delete topic (tid: ' + postData.tid + ')', err.stack);
|
||||
@@ -164,7 +164,7 @@ var RDB = require('./redis.js'),
|
||||
pid: pid
|
||||
});
|
||||
|
||||
threadTools.get_latest_undeleted_pid(postData.tid, function(err, pid) {
|
||||
threadTools.getLatestUndeletedPid(postData.tid, function(err, pid) {
|
||||
posts.getPostField(pid, 'timestamp', function(timestamp) {
|
||||
topics.updateTimestamp(postData.tid, timestamp);
|
||||
});
|
||||
|
||||
@@ -297,7 +297,7 @@ var RDB = require('./redis.js'),
|
||||
});
|
||||
}
|
||||
|
||||
ThreadTools.get_latest_undeleted_pid = function(tid, callback) {
|
||||
ThreadTools.getLatestUndeletedPid = function(tid, callback) {
|
||||
RDB.lrange('tid:' + tid + ':posts', 0, -1, function(err, pids) {
|
||||
if (pids.length === 0) return callback(new Error('no-undeleted-pids-found'));
|
||||
|
||||
|
||||
@@ -572,7 +572,7 @@ schema = require('./schema.js'),
|
||||
}
|
||||
|
||||
Topics.getTeaser = function(tid, callback) {
|
||||
threadTools.get_latest_undeleted_pid(tid, function(err, pid) {
|
||||
threadTools.getLatestUndeletedPid(tid, function(err, pid) {
|
||||
if (!err) {
|
||||
posts.getPostFields(pid, ['content', 'uid', 'timestamp'], function(postData) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user