mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #13676, bug where nested remote categories could not be removed
This commit is contained in:
@@ -218,7 +218,9 @@ categoriesController.removeRemote = async function (req, res) {
|
|||||||
return helpers.formatApiResponse(400, res);
|
return helpers.formatApiResponse(400, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
await db.sortedSetRemove('cid:0:children', req.params.cid);
|
const parentCid = await categories.getCategoryField(req.params.cid, 'parentCid');
|
||||||
cache.del('cid:0:children');
|
await db.sortedSetRemove(`cid:${parentCid || 0}:children`, req.params.cid);
|
||||||
|
cache.del(`cid:${parentCid || 0}:children`);
|
||||||
|
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user