flyzto hace 5 meses
padre
commit
07df90b074
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      server/models/GamesPs.js

+ 2 - 2
server/models/GamesPs.js

@@ -597,8 +597,6 @@ const updateSolutions = (solutions) => {
 const getSolutions = async () => {
   const { minShowAmount } = await getSetting();
   const solutionsList = Object.values(GAMES.Solutions);
-  const relIds = solutionsList.map(item => item.info.id);
-  const gamesEvents = getGamesEvents({ relIds });
   const gamesRelation = getGamesRelation();
   const relationsMap = new Map(gamesRelation.map(item => [item.id, item.rel]));
   const solutions = solutionsList.sort((a, b) => b.sol.win_average - a.sol.win_average)
@@ -614,6 +612,8 @@ const getSolutions = async () => {
       info: { id, ...relation }
     }
   });
+  const relIds = solutions.map(item => item.info.id);
+  const gamesEvents = getGamesEvents({ relIds });
   return { solutions, gamesEvents };
 }