Some fixes + draft newmove pingback logic (unfinished, not working)
[vchess.git] / client / src / views / MyGames.vue
index 5d19e7d..c1430f8 100644 (file)
@@ -43,10 +43,6 @@ export default {
   },
   created: function() {
     GameStorage.getAll(true, localGames => {
-
-
-console.log(localGames);
-
       localGames.forEach(g => (g.type = this.classifyObject(g)));
       this.liveGames = localGames;
     });
@@ -96,8 +92,7 @@ console.log(localGames);
     },
     socketMessageListener: function(msg) {
       const data = JSON.parse(msg.data);
-      // Only event is newmove, and received only:
-      if (data.code == "newmove") {
+      if (data.code == "changeturn") {
         let games = !!parseInt(data.gid)
           ? this.corrGames
           : this.liveGames;