Skip to content

Commit f139f8a

Browse files
authored
Remove pug check
Technically shouldn't be needed as we wish to keep teams anyways in the struct.
1 parent d1c835e commit f139f8a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

routes/matches/matches.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,13 @@ router.get("/:match_id/config", async (req, res, next) => {
556556
matchJSON.maps_to_win = parseInt(matchInfo[0].max_maps / 2 + 1);
557557
}
558558
// Fill out team data only if we are not PUGging.
559-
if (matchInfo[0].is_pug == 0 || matchInfo[0].is_pug == null) {
560-
sql = "SELECT * FROM team WHERE id = ?";
561-
const team1Data = await db.query(sql, [matchInfo[0].team1_id]);
562-
const team2Data = await db.query(sql, [matchInfo[0].team2_id]);
563-
matchJSON.team1 = await build_team_dict(team1Data[0], 1, matchInfo[0]);
564-
matchJSON.team2 = await build_team_dict(team2Data[0], 2, matchInfo[0]);
565-
}
559+
//if (matchInfo[0].is_pug == 0 || matchInfo[0].is_pug == null) {
560+
sql = "SELECT * FROM team WHERE id = ?";
561+
const team1Data = await db.query(sql, [matchInfo[0].team1_id]);
562+
const team2Data = await db.query(sql, [matchInfo[0].team2_id]);
563+
matchJSON.team1 = await build_team_dict(team1Data[0], 1, matchInfo[0]);
564+
matchJSON.team2 = await build_team_dict(team2Data[0], 2, matchInfo[0]);
565+
//}
566566
sql = "SELECT * FROM match_cvar WHERE match_id = ?";
567567
matchCvars = await db.query(sql, matchID);
568568
matchCvars.forEach((row) => {

0 commit comments

Comments
 (0)