Skip to content

Node.js based forum software built for the modern web

trace in addPostData

barisusakli0d5605ab3511
diff --git a/src/topics/posts.js b/src/topics/posts.js
index ece6c5fcd2..20edb89ea4 100644
--- a/src/topics/posts.js
+++ b/src/topics/posts.js
@@ -3,6 +3,7 @@
'use strict';
var async = require('async'),
+ winston = require('winston'),
db = require('../database'),
user = require('../user'),
@@ -37,6 +38,10 @@ module.exports = function(Topics) {
};
Topics.addPostData = function(postData, uid, callback) {
+ if (postData && postData.length > 50) {
+ var e = new Error('too many keys');
+ winston.warn('[ADD POST DATA] ' + postData.length, e.stack);
+ }
var pids = postData.map(function(post) {
return post && post.pid;
});