Minor bugfix
This commit is contained in:
parent
9f58f902b8
commit
eb70ef67b5
|
@ -165,8 +165,6 @@ async function setMatchWinner(matchId, winnerId) {
|
|||
async function unsetContestantAndWinner(matchId, teamId) {
|
||||
let match = await getMatch(matchId);
|
||||
return new Promise(function(resolve, reject) {
|
||||
unsetContestant(matchId, teamId)
|
||||
.then(() => {
|
||||
// Find what the child match that supplied the team
|
||||
connection.query("SELECT * FROM matches WHERE parentMatchId = ? AND winnerId = ?", [matchId, teamId], (err, childMatches) => {
|
||||
if (err) { console.log(err); reject(err); }
|
||||
|
@ -180,8 +178,6 @@ async function unsetContestantAndWinner(matchId, teamId) {
|
|||
.then(() => { resolve(); })
|
||||
.catch(err => { reject(err); });
|
||||
});
|
||||
})
|
||||
.catch(err => { reject(err); });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue