Skip to content
Snippets Groups Projects
Commit f656b024 authored by Joni Laukka's avatar Joni Laukka
Browse files

Node settings changed to ints from strings

parent a3f038ca
No related branches found
No related tags found
2 merge requests!46Development to testing,!42Node settings changed to ints from strings
...@@ -221,6 +221,8 @@ export default class EditGameForm extends React.Component { ...@@ -221,6 +221,8 @@ export default class EditGameForm extends React.Component {
objectivePoints = []; objectivePoints = [];
} }
console.log(objectivePoints);
// Object the form sends to server // Object the form sends to server
let gameObject = { let gameObject = {
name: this.state.gamename, name: this.state.gamename,
...@@ -230,22 +232,18 @@ export default class EditGameForm extends React.Component { ...@@ -230,22 +232,18 @@ export default class EditGameForm extends React.Component {
enddate: endDate, enddate: endDate,
center: this.state.mapCenter, center: this.state.mapCenter,
factions: this.state.factions, factions: this.state.factions,
objective_points: objectivePoints objective_points: objectivePoints,
}; nodesettings: {
// Add node settings to the game if the game has objective points
if (objectivePoints.length > 0) {
gameObject.nodesettings = {
node_settings: { node_settings: {
capture_time: this.state.capture_time, capture_time: parseInt(this.state.capture_time),
confirmation_time: this.state.confirmation_time, confirmation_time: parseInt(this.state.confirmation_time),
owner: 0, owner: 0,
capture: 0, capture: 0,
buttons_available: 16, buttons_available: 16,
heartbeat_interval: 60 heartbeat_interval: 60
} }
}; }
} };
let token = sessionStorage.getItem("token"); let token = sessionStorage.getItem("token");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment