Draft of problems section
[vchess.git] / server / models / Game.js
index 70f32be..27f5d1e 100644 (file)
@@ -36,8 +36,6 @@ const GameModel =
   checkGameInfo: function(g) {
     if (!g.vid.toString().match(/^[0-9]+$/))
       return "Wrong variant ID";
-    if (!g.vname.match(/^[a-zA-Z0-9]+$/))
-      return "Wrong variant name";
     if (!g.cadence.match(/^[0-9dhms +]+$/))
       return "Wrong characters in time control";
     if (!g.fen.match(/^[a-zA-Z0-9, /-]*$/))
@@ -291,7 +289,7 @@ const GameModel =
             if ((mstats.nbMoves == 0 && tsNow - g.created > 91*day) ||
               (mstats.nbMoves == 1 && tsNow - mstats.lastMaj > 91*day))
             {
-              return GameModel.remove(g.id);
+              GameModel.remove(g.id);
             }
           });
         });