mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
getTopicwithposts
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var async = require('async'),
|
||||
winston = require('winston'),
|
||||
validator = require('validator'),
|
||||
|
||||
_ = require('underscore'),
|
||||
@@ -243,6 +244,10 @@ var async = require('async'),
|
||||
};
|
||||
|
||||
Topics.getTopicWithPosts = function(tid, set, uid, start, end, reverse, callback) {
|
||||
if (end - start > 50) {
|
||||
var e = new Error('TOO LARGE');
|
||||
winston.warn('GET_TOPIC_WITH_POSTS set, start, end, uid, tid', set, start, end, uid, tid, e.stack);
|
||||
}
|
||||
Topics.getTopicData(tid, function(err, topicData) {
|
||||
if (err || !topicData) {
|
||||
return callback(err || new Error('[[error:no-topic]]'));
|
||||
|
||||
Reference in New Issue
Block a user