fix: missing brace in ranked score block
This commit is contained in:
@@ -439,6 +439,8 @@ app.post("/api/matches/:id/verify", (req, res) => {
|
|||||||
score.confirmed_at = new Date().toISOString();
|
score.confirmed_at = new Date().toISOString();
|
||||||
|
|
||||||
// Update player wins/losses (idempotent via player_match_stats tabel)
|
// Update player wins/losses (idempotent via player_match_stats tabel)
|
||||||
|
// Alleen voor ranked matches
|
||||||
|
if (m.match_type === 'ranked') {
|
||||||
for (const pid of score.team1) {
|
for (const pid of score.team1) {
|
||||||
const p = db.getPlayer(String(pid));
|
const p = db.getPlayer(String(pid));
|
||||||
if (p && !db.hasMatchStat(String(pid), m.id)) {
|
if (p && !db.hasMatchStat(String(pid), m.id)) {
|
||||||
@@ -456,6 +458,7 @@ app.post("/api/matches/:id/verify", (req, res) => {
|
|||||||
} else {
|
} else {
|
||||||
score.status = hasOpponentConfirm ? "confirmed" : "partial";
|
score.status = hasOpponentConfirm ? "confirmed" : "partial";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
db.updateMatch(String(req.params.id), { score });
|
db.updateMatch(String(req.params.id), { score });
|
||||||
m = db.getMatch(String(req.params.id));
|
m = db.getMatch(String(req.params.id));
|
||||||
|
|||||||
Reference in New Issue
Block a user