From 59a91fdb6fe687f3c6ac4ee69bbdd6629781eec8 Mon Sep 17 00:00:00 2001 From: Arek Date: Thu, 2 Jun 2022 17:53:56 +0200 Subject: [PATCH] refactor: :bug: Add more apis elements in creation Now we have more api inputs to send in tournament creating --- frontend/dodawanie turnieju/app.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/frontend/dodawanie turnieju/app.js b/frontend/dodawanie turnieju/app.js index 1a47f50..8b48717 100644 --- a/frontend/dodawanie turnieju/app.js +++ b/frontend/dodawanie turnieju/app.js @@ -9,5 +9,21 @@ document.getElementById("tournamentSubmit").addEventListener("click", function ( } xhttp.open("PUT", "dragonmaster.pl/inz/tournament"); xhttp.setRequestHeader("Authorization", "Bearer " + token); - xhttp.send('{"name":"' + document.getElementById("tournamentName").value + '","typeOfLadder":"' + document.getElementById("ladderType").value + '","pointsForTournament":"' + document.getElementById("tournamentPoints").value + '","places":"' + document.getElementById("tournamentPlace").value + '","roles":"' + document.getElementById("tournamentRole").value + '","ranked":"' + document.getElementById("isRanked").value + '"}'); + xhttp.send('{"name":"' + document.getElementById("tournamentName").value + + '","typeOfLadder":"' + document.getElementById("ladderType").value + + '","pointsForTournament":"' + document.getElementById("tournamentPoints").value + + '","places":"' + document.getElementById("tournamentPlace").value + + '","roles":"' + document.getElementById("tournamentRole").value + + '","ranked":"' + document.getElementById("isRanked").value + + '","place":"' + document.getElementById("tournamentPlace").value + + '","from":"' + document.getElementById("tournamentFrom").value + + '","to":"' + document.getElementById("tournamentTo").value + + '","rang":"' + document.getElementById("tournamentRang").value + + '","entyFee":"' + document.getElementById("tournamentEntyFee").value + + '","director":"' + document.getElementById("tournamentDirector").value + + '","phone":"' + document.getElementById("directorphone").value + + '","entriesTo":"' + document.getElementById("tournamentEntriesTo").value + + '","additionalInformations":"' + document.getElementById("tournamentAddInfo").value + + '","category":"' + "cat1" + + '","}'); }); \ No newline at end of file