Merge branch 'master' of https://eng-git.canterbury.ac.nz/fwy13/territory_walker
commit
b9678a745f
@ -1,11 +1,17 @@
|
|||||||
let db = require("../config/db.js");
|
let db = require("../config/db.js");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getPolygons : function (res) {
|
getPolygons : function (req, res) {
|
||||||
db.get().query("", function(err, rows){
|
if (req.query.gameID != null) {
|
||||||
if (err) return res.send(400);
|
let query = "CALL getPolygonPoints(\"samdum\");";
|
||||||
res.send(rows);
|
console.log("hi");
|
||||||
return;
|
db.get().query(query, function(err, rows){
|
||||||
});
|
if (err) return res.send(400);
|
||||||
|
res.send(rows[0]);
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
res.send(500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue