mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
closes #3327
This commit is contained in:
@@ -8,10 +8,15 @@ var async = require('async'),
|
||||
privileges = require('../privileges'),
|
||||
plugins = require('../plugins'),
|
||||
cache = require('./cache'),
|
||||
pubsub = require('../pubsub'),
|
||||
utils = require('../../public/src/utils');
|
||||
|
||||
module.exports = function(Posts) {
|
||||
|
||||
pubsub.on('post:edit', function(pid) {
|
||||
cache.del(pid);
|
||||
});
|
||||
|
||||
Posts.edit = function(data, callback) {
|
||||
var now = Date.now();
|
||||
var postData;
|
||||
@@ -58,7 +63,7 @@ module.exports = function(Posts) {
|
||||
editMainPost(data, postData, next);
|
||||
},
|
||||
post: function(next) {
|
||||
cache.del(postData.pid);
|
||||
pubsub.publish('post:edit', postData.pid);
|
||||
Posts.parsePost(postData, next);
|
||||
}
|
||||
}, function(err, results) {
|
||||
|
||||
Reference in New Issue
Block a user