moved topic locked check to topic.reply

This commit is contained in:
Baris Soner Usakli
2014-03-01 22:03:21 -05:00
parent 77f5d6ff7d
commit fb691b23b4
2 changed files with 8 additions and 7 deletions

View File

@@ -171,6 +171,14 @@ var async = require('async'),
if (!topicExists) {
return next(new Error('topic doesn\'t exist'));
}
Topics.isLocked(tid, next);
},
function(locked, next) {
if (locked) {
return next(new Error('topic-locked'));
}
threadTools.privileges(tid, uid, next);
},
function(privilegesData, next) {