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) { Topics.purge = async function (tid, uid) {
const [deletedTopic, tags] = await Promise.all([ const deletedTopic = await Topics.getTopicData(tid);
Topics.getTopicData(tid),
Topics.getTopicTags(tid),
]);
if (!deletedTopic) { if (!deletedTopic) {
return; return;
} }
deletedTopic.tags = tags; deletedTopic.tags = deletedTopic.tags.map(tag => tag.value);
await deleteFromFollowersIgnorers(tid); await deleteFromFollowersIgnorers(tid);
await Promise.all([ await Promise.all([