|
|
|
|
@ -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 {
|
|
|
|
|
|