Commit 584b7a61 authored by Dennis Willers's avatar Dennis Willers 🏀

Players can now Vote for a map

parent d7b249f7
Pipeline #422 passed with stages
in 2 minutes and 51 seconds
......@@ -13,7 +13,8 @@ function isJsonString(str) {
}
function checkIfRequestHasVote(json) {
return json.hasOwnProperty('vote');
console.log("Has Vote: " + JSON.parse(json).hasOwnProperty('vote'), json);
return JSON.parse(json).hasOwnProperty('vote');
}
function sendRequest(url, json, callback) {
......
......@@ -244,7 +244,8 @@ const testClient = net.connect({host: 'localhost', port: 3000}, () => {
testClient.write(JSON.stringify({
"mapId": "keineBekannteMap1",
"name": "keinBekannterMapName1",
"userId": "keinBekannterUser1"
"userId": "keinBekannterUser1",
"vote": 80
}));
//test(testClient);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment