projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix CRON tasks
[vchess.git]
/
server
/
models
/
Variant.js
diff --git
a/server/models/Variant.js
b/server/models/Variant.js
index
233d938
..
dccc89b
100644
(file)
--- a/
server/models/Variant.js
+++ b/
server/models/Variant.js
@@
-9,28
+9,17
@@
var db = require("../utils/database");
const VariantModel =
{
const VariantModel =
{
- getByName: function(name, callback)
- {
- db.serialize(function() {
- const query =
- "SELECT * " +
- "FROM Variants " +
- "WHERE name='" + name + "'";
- db.get(query, callback);
- });
- },
+ getAll: function(callback)
+ {
+ db.serialize(function() {
+ const query =
+ "SELECT * " +
+ "FROM Variants";
+ db.all(query, callback);
+ });
+ },
- getAll: function(callback)
- {
- db.serialize(function() {
- const query =
- "SELECT * " +
- "FROM Variants";
- db.all(query, callback);
- });
- },
-
- //create, update, delete: directly in DB
+ //create, update, delete: directly in DB
}
module.exports = VariantModel;
}
module.exports = VariantModel;