'update'
[vchess.git] / server / models / User.js
index cf4c529..9401133 100644 (file)
@@ -63,6 +63,16 @@ const UserModel =
                });
        },
 
+  getByName: function(names, cb) {
+               db.serialize(function() {
+                       const query =
+                               "SELECT id
+        "FROM Users " +
+                               "WHERE name IN ('" + names.join("','") + "')";;
+                       db.all(query, cb);
+               });
+  },
+
        /////////
        // MODIFY