Some adjustments, next: fix time control handling + finish corr play
[vchess.git] / server / models / User.js
index 9401133..7a0f70a 100644 (file)
@@ -66,9 +66,9 @@ const UserModel =
   getByName: function(names, cb) {
                db.serialize(function() {
                        const query =
-                               "SELECT id
+                               "SELECT id " +
         "FROM Users " +
-                               "WHERE name IN ('" + names.join("','") + "')";;
+                               "WHERE name IN ('" + names.join("','") + "')";
                        db.all(query, cb);
                });
   },
@@ -124,6 +124,15 @@ const UserModel =
                        db.run(query, cb);
                });
        },
+
+  /////////////////
+  // NOTIFICATIONS
+
+  tryNotify: function(oppId, gid, vname, message)
+  {
+    // TODO: send email to oppId (request...) with title
+    // "vchess.club - vname" and content "message"
+  }
 }
 
 module.exports = UserModel;