projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve notification system after a move or at new game
[vchess.git]
/
server
/
models
/
Game.js
diff --git
a/server/models/Game.js
b/server/models/Game.js
index
315b5e2
..
d15072d
100644
(file)
--- a/
server/models/Game.js
+++ b/
server/models/Game.js
@@
-112,6
+112,19
@@
const GameModel =
});
},
});
},
+ getPlayers: function(id, cb)
+ {
+ db.serialize(function() {
+ const query =
+ "SELECT id " +
+ "FROM Players " +
+ "WHERE gid = " + id;
+ db.all(query, (err,players) => {
+ return cb(err, players);
+ });
+ });
+ },
+
// obj can have fields move, fen and/or score
update: function(id, obj, cb)
{
// obj can have fields move, fen and/or score
update: function(id, obj, cb)
{