});
},
+ getByName: function(names, cb) {
+ db.serialize(function() {
+ const query =
+ "SELECT id " +
+ "FROM Users " +
+ "WHERE name IN ('" + names.join("','") + "')";
+ db.all(query, cb);
+ });
+ },
+
/////////
// MODIFY
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;