mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-14 10:37:45 +01:00
refactor: tags were moved into topic hash a while ago
This commit is contained in:
@@ -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([
|
||||||
|
|||||||
Reference in New Issue
Block a user