Node.js based forum software built for the modern web
refactor: change schduled restore to happen first
Barış Soner Uşaklıf28200d5a6bc
diff --git a/src/topics/scheduled.js b/src/topics/scheduled.jsindex e16cc71d0d..dff9dc75b7 100644--- a/src/topics/scheduled.js+++ b/src/topics/scheduled.js@@ -45,10 +45,8 @@ async function postTids(tids) {// Restore first to be not filtered for being deleted// Restoring handles "updateRecentTid"- await Promise.all([].concat(- topicsData.map(topicData => topics.restore(topicData.tid)),- topicsData.map(topicData => topics.updateLastPostTimeFromLastPid(topicData.tid))- ));+ await Promise.all(topicsData.map(t => topics.restore(t.tid)));+ await Promise.all(topicsData.map(t => topics.updateLastPostTimeFromLastPid(t.tid)));await Promise.all([].concat(sendNotifications(uids, topicsData),