Fixed polygons not returning as a list

main
Umbra Sheep 7 years ago
parent adbea487af
commit 57ce322aca

@ -12,16 +12,18 @@ module.exports = {
return res.send(400);
}
// console.log(rows);
let polygon = {}
let polygons = []
polygon.coords = [];
rows[0].map((point) => {
let polygon = {};
polygon.polygonID = point.polygonID;
polygon.coords.push({lat: point.lat, lng: point.lng});
polygon.gameID = point.gameID;
polygon.userID = point.userID;
polygon.colour = point.colour;
polygons.push(polygon);
});
res.send(polygon);
res.send(polygons);
return;
});
} else {

Loading…
Cancel
Save