Allow hyphen in username on server side + add icons for navigation
[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
ab4f4bf2 10const VariantModel =
8d7e2786 11{
dac39588
BA
12 getAll: function(callback)
13 {
14 db.serialize(function() {
15 const query =
16 "SELECT * " +
17 "FROM Variants";
18 db.all(query, callback);
19 });
20 },
ab4f4bf2 21
dac39588 22 //create, update, delete: directly in DB
8d7e2786
BA
23}
24
ab4f4bf2 25module.exports = VariantModel;