mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: missing cache deletion calls for post-queue cache
/cc @barisusakli
This commit is contained in:
@@ -145,6 +145,7 @@ module.exports = function (Posts) {
|
|||||||
await db.sortedSetAdd('post:queue', now, id);
|
await db.sortedSetAdd('post:queue', now, id);
|
||||||
await db.setObject(`post:queue:${id}`, payload);
|
await db.setObject(`post:queue:${id}`, payload);
|
||||||
await user.setUserField(data.uid, 'lastqueuetime', now);
|
await user.setUserField(data.uid, 'lastqueuetime', now);
|
||||||
|
cache.del('post-queue');
|
||||||
|
|
||||||
const cid = await getCid(type, data);
|
const cid = await getCid(type, data);
|
||||||
const uids = await getNotificationUids(cid);
|
const uids = await getNotificationUids(cid);
|
||||||
@@ -202,6 +203,7 @@ module.exports = function (Posts) {
|
|||||||
await removeQueueNotification(id);
|
await removeQueueNotification(id);
|
||||||
await db.sortedSetRemove('post:queue', id);
|
await db.sortedSetRemove('post:queue', id);
|
||||||
await db.delete(`post:queue:${id}`);
|
await db.delete(`post:queue:${id}`);
|
||||||
|
cache.del('post-queue');
|
||||||
};
|
};
|
||||||
|
|
||||||
Posts.submitFromQueue = async function (id) {
|
Posts.submitFromQueue = async function (id) {
|
||||||
@@ -261,6 +263,7 @@ module.exports = function (Posts) {
|
|||||||
data.data.cid = editData.cid;
|
data.data.cid = editData.cid;
|
||||||
}
|
}
|
||||||
await db.setObjectField(`post:queue:${editData.id}`, 'data', JSON.stringify(data.data));
|
await db.setObjectField(`post:queue:${editData.id}`, 'data', JSON.stringify(data.data));
|
||||||
|
cache.del('post-queue');
|
||||||
};
|
};
|
||||||
|
|
||||||
Posts.canEditQueue = async function (uid, editData) {
|
Posts.canEditQueue = async function (uid, editData) {
|
||||||
|
|||||||
Reference in New Issue
Block a user