flyzto 4 달 전
부모
커밋
78a05fb2cf
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      server/triangle/trangleCalc.js

+ 2 - 2
server/triangle/trangleCalc.js

@@ -136,7 +136,7 @@ const eventsCombination = (passableEvents) => {
       const optimalSelections = getOptimalSelections(odds, rules);
 
       optimalSelections.forEach(selection => {
-        const { rule, iors, index } = selection;
+        const { rule, iors, ruleIndex } = selection;
         const [, , , crossType] = rule;
         const oddsSideA = attachRebate(iors[0]);
         const oddsSideB = attachRebate(iors[1]);
@@ -166,7 +166,7 @@ const eventsCombination = (passableEvents) => {
           const sid = crypto.createHash('sha1').update(`${id}_${keys}`).digest('hex');
           const crpGroup = `${id}_${sortedCpr[0].k}`;
           const timestamp = Date.now();
-          solutions.push({sid, sol, cpr, info, group: crpGroup, rule: `${iorGroup}:${index}`, timestamp});
+          solutions.push({sid, sol, cpr, info, group: crpGroup, rule: `${iorGroup}:${ruleIndex}`, timestamp});
         }
       });
     });