mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
update category topic count if topic is deleted/restored
This commit is contained in:
@@ -788,6 +788,7 @@ var RDB = require('./redis.js'),
|
||||
|
||||
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
||||
feed.updateCategory(cid);
|
||||
RDB.hincrby('category:' + cid, 'topic_count', -1);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -799,6 +800,7 @@ var RDB = require('./redis.js'),
|
||||
|
||||
Topics.getTopicField(tid, 'cid', function(err, cid) {
|
||||
feed.updateCategory(cid);
|
||||
RDB.hincrby('category:' + cid, 'topic_count', 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user