Skip to content

Commit

Permalink
Remove pug check
Browse files Browse the repository at this point in the history
Technically shouldn't be needed as we wish to keep teams anyways in the struct.
  • Loading branch information
PhlexPlexico committed Mar 6, 2021
1 parent d1c835e commit f139f8a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions routes/matches/matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,13 @@ router.get("/:match_id/config", async (req, res, next) => {
matchJSON.maps_to_win = parseInt(matchInfo[0].max_maps / 2 + 1);
}
// Fill out team data only if we are not PUGging.
if (matchInfo[0].is_pug == 0 || matchInfo[0].is_pug == null) {
sql = "SELECT * FROM team WHERE id = ?";
const team1Data = await db.query(sql, [matchInfo[0].team1_id]);
const team2Data = await db.query(sql, [matchInfo[0].team2_id]);
matchJSON.team1 = await build_team_dict(team1Data[0], 1, matchInfo[0]);
matchJSON.team2 = await build_team_dict(team2Data[0], 2, matchInfo[0]);
}
//if (matchInfo[0].is_pug == 0 || matchInfo[0].is_pug == null) {
sql = "SELECT * FROM team WHERE id = ?";
const team1Data = await db.query(sql, [matchInfo[0].team1_id]);
const team2Data = await db.query(sql, [matchInfo[0].team2_id]);
matchJSON.team1 = await build_team_dict(team1Data[0], 1, matchInfo[0]);
matchJSON.team2 = await build_team_dict(team2Data[0], 2, matchInfo[0]);
//}
sql = "SELECT * FROM match_cvar WHERE match_id = ?";
matchCvars = await db.query(sql, matchID);
matchCvars.forEach((row) => {
Expand Down

0 comments on commit f139f8a

Please sign in to comment.