Changed polygon output to be more friendly

main
Umbra Sheep 7 years ago
parent e0377fc548
commit adbea487af

@ -12,7 +12,16 @@ module.exports = {
return res.send(400);
}
// console.log(rows);
res.send(rows[0]);
let polygon = {}
polygon.coords = [];
rows[0].map((point) => {
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;
});
res.send(polygon);
return;
});
} else {

Loading…
Cancel
Save