projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Experimental simplification in Game.vue (next step: check move validity when receiving)
[vchess.git]
/
server
/
models
/
Variant.js
diff --git
a/server/models/Variant.js
b/server/models/Variant.js
index
85abf5a
..
f439e19
100644
(file)
--- a/
server/models/Variant.js
+++ b/
server/models/Variant.js
@@
-4,10
+4,14
@@
const db = require("../utils/database");
* Structure:
* id: integer
* name: varchar
* Structure:
* id: integer
* name: varchar
+ * display: varchar
+ * groupe: integer
* description: varchar
* description: varchar
+ * noProblems: boolean
*/
const VariantModel = {
*/
const VariantModel = {
+
getAll: function(callback) {
db.serialize(function() {
const query =
getAll: function(callback) {
db.serialize(function() {
const query =
@@
-15,9
+19,10
@@
const VariantModel = {
"FROM Variants";
db.all(query, callback);
});
"FROM Variants";
db.all(query, callback);
});
- }
,
+ }
//create, update, delete: directly in DB
//create, update, delete: directly in DB
-}
+
+};
module.exports = VariantModel;
module.exports = VariantModel;