Update TODO + cosmetics
[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 10const VariantModel = {
937c24ab 11
0234201f 12 getAll: function(callback) {
dac39588
BA
13 db.serialize(function() {
14 const query =
15 "SELECT * " +
16 "FROM Variants";
17 db.all(query, callback);
18 });
937c24ab 19 }
ab4f4bf2 20
dac39588 21 //create, update, delete: directly in DB
937c24ab
BA
22
23};
8d7e2786 24
ab4f4bf2 25module.exports = VariantModel;