Fixes. TODO: autofocus on forms, and understand why email autofill in name field
[vchess.git] / server / models / Game.js
index 3fde91f..d72f51a 100644 (file)
@@ -242,6 +242,7 @@ const GameModel =
         query += modifs + " WHERE id = " + id;
         db.run(query);
       }
+      // NOTE: move, chat and delchat are mutually exclusive
       if (obj.move)
       {
         // Security: only update moves if index is right
@@ -275,7 +276,7 @@ const GameModel =
           "DELETE " +
           "FROM Chats " +
           "WHERE gid = " + id;
-        db.run(query, cb);
+        db.run(query);
       }
     });
   },