X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=models%2FProblem.js;fp=models%2FProblem.js;h=cdd146e704c5086e33d73332f8547c212d30db0c;hb=c018b304ba439ca92348dcb65715707f5cfcee05;hp=0c800901c4256014b546a9ee7e3e4af1ddf25f08;hpb=8a477a7e1b781babc74d7935b80ac0b18ec04f86;p=vchess.git diff --git a/models/Problem.js b/models/Problem.js index 0c800901..cdd146e7 100644 --- a/models/Problem.js +++ b/models/Problem.js @@ -2,7 +2,7 @@ var db = require("../utils/database"); /* * Structure: - * _id: problem number (int) + * id: problem number (int) * uid: user id (int) * vid: variant id (int) * added: timestamp @@ -18,7 +18,7 @@ exports.create = function(vname, fen, instructions, solution) "INSERT INTO Problems (added, vid, fen, instructions, solution) VALUES " + "(" + Date.now() + "," + - variant._id + "," + + variant.id + "," + fen + "," + instructions + "," + solution +