Refactor models (merge Players in Games), add cursor to correspondance games. Finishe...
[vchess.git] / server / models / Variant.js
... / ...
CommitLineData
1const db = require("../utils/database");
2
3/*
4 * Structure:
5 * id: integer
6 * name: varchar
7 * description: varchar
8 */
9
10const VariantModel = {
11 getAll: function(callback) {
12 db.serialize(function() {
13 const query =
14 "SELECT * " +
15 "FROM Variants";
16 db.all(query, callback);
17 });
18 },
19
20 //create, update, delete: directly in DB
21}
22
23module.exports = VariantModel;