flyzto 5 сар өмнө
parent
commit
a8e60b91b3

+ 5 - 2
server/models/GamesPs.js

@@ -671,8 +671,11 @@ const getTotalProfitWithSid = async (sid1, sid2, inner_base, inner_rebate) => {
   const subSolution = GAMES.Solutions[sid2];
   const sol1 = preSolution?.sol;
   const sol2 = subSolution?.sol;
-  if (!sol1 || !sol2) {
-    return Promise.reject(new Error('SOLUTION_ID_INVALID'));
+  if (!sol1) {
+    return Promise.reject(new Error('sid1 已失效'));
+  }
+  if (!sol2) {
+    return Promise.reject(new Error('sid2 已失效'));
   }
   const profit = await getTotalProfit(sol1, sol2, inner_base, inner_rebate);
   return { profit, solutions: [preSolution, subSolution] };