Add Koopa chess, fix Apocalypse and Dice variants
[vchess.git] / server / models / Variant.js
CommitLineData
c5c47010 1const db = require("../utils/database");
8d7e2786
BA
2
3/*
4 * Structure:
c018b304 5 * id: integer
8d7e2786
BA
6 * name: varchar
7 * description: varchar
8 */
9
0234201f
BA
10const VariantModel = {
11 getAll: function(callback) {
dac39588
BA
12 db.serialize(function() {
13 const query =
14 "SELECT * " +
15 "FROM Variants";
16 db.all(query, callback);
17 });
18 },
ab4f4bf2 19
dac39588 20 //create, update, delete: directly in DB
8d7e2786
BA
21}
22
ab4f4bf2 23module.exports = VariantModel;