refactor: tags were moved into topic hash a while ago

This commit is contained in:
Barış Soner Uşaklı
2026-01-20 11:57:22 -05:00
parent 512b1e7296
commit 2ba8907ac8

View File

@@ -73,14 +73,11 @@ module.exports = function (Topics) {
};
Topics.purge = async function (tid, uid) {
const [deletedTopic, tags] = await Promise.all([
Topics.getTopicData(tid),
Topics.getTopicTags(tid),
]);
const deletedTopic = await Topics.getTopicData(tid);
if (!deletedTopic) {
return;
}
deletedTopic.tags = tags;
deletedTopic.tags = deletedTopic.tags.map(tag => tag.value);
await deleteFromFollowersIgnorers(tid);
await Promise.all([