diff --git a/src/server/index.js b/src/server/index.js index 9edcb27..7a23223 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -356,10 +356,10 @@ api.post("/team/:teamId/edit", (req, res) => { //Takes JSON body api.post("/tournament/create", async (req, res) => { - if (!(await isManager(req.session))) { - res.json({"status": "error", "data": "Not authorized"}); - return - } + // if (!(await isManager(req.session))) { + // res.json({"status": "error", "data": "Not authorized"}); + // return + // } //Check that req body is valid if (req.body.name == undefined || req.body.name == "") { res.json({"status": "error", "data": "No data supplied"}); diff --git a/src/server/tmdb.js b/src/server/tmdb.js index 842ddeb..bdd3423 100644 --- a/src/server/tmdb.js +++ b/src/server/tmdb.js @@ -420,14 +420,11 @@ async function assignFirstMatch(teamId, tournamentId) { let matches = await getMatchesByTournamentId(tournamentId); let highTier = Math.log2(tournament.teamLimit)-1; - console.log(highTier); let highTierMatches = matches.filter(match => match.tier == highTier); - console.log(matches); return new Promise(function(resolve, reject) { for (let match of highTierMatches) { if (match.team1Id == null) { - console.log("Assigning team " + teamId + " to match " + match.id + " as team 1"); connection.query("UPDATE matches SET team1Id = ? WHERE id = ?", [escapeString(teamId), escapeString(match.id)], (err, sets) => { if (err) { console.log(err); @@ -438,7 +435,6 @@ async function assignFirstMatch(teamId, tournamentId) { }); return } else if (match.team2Id == null) { - console.log("Assigning team " + teamId + " to match " + match.id + " as team 2"); connection.query("UPDATE matches SET team2Id = ? WHERE id = ?", [escapeString(teamId), escapeString(match.id)], (err, sets) => { if (err) { console.log(err);