Add persistent match history to server pages
This commit is contained in:
@@ -77,6 +77,11 @@ export function recordLeaderboardTelemetry(handle: Database.Database, report: Ga
|
||||
}
|
||||
if (!match) return;
|
||||
|
||||
if (isStart) {
|
||||
handle.prepare('UPDATE leaderboard_matches SET start_players = COALESCE(start_players, ?) WHERE id = ?')
|
||||
.run(report.players.length, match.id);
|
||||
}
|
||||
|
||||
const previous = new Map((handle.prepare('SELECT guid, last_round, present FROM leaderboard_match_players WHERE match_id = ?')
|
||||
.all(match.id) as Participation[]).map(player => [player.guid, player]));
|
||||
handle.prepare('UPDATE leaderboard_match_players SET present = 0 WHERE match_id = ?').run(match.id);
|
||||
|
||||
Reference in New Issue
Block a user