Merge branch 'v0' into 'v0'

Fix results POST and GET

See merge request spfn/rust-nex!5
This commit is contained in:
Maple 2026-04-12 21:32:53 +02:00
commit ec3477afaa

View file

@ -659,6 +659,12 @@ impl Ranking for User {
};
let team_votes = fetch_team_votes(fest_id)?;
let mut wins = vec![0u32, 0u32];
for r in &results {
if r.team_win == 1 && (r.team_id == 0 || r.team_id == 1) {
wins[r.team_id as usize] += 1;
}
}
let score_data: Vec<CompetitionRankingScoreData> = results
.iter()
@ -676,7 +682,7 @@ impl Ranking for User {
fest_id,
score_data,
unk: 0,
team_wins: results.iter().map(|r| r.team_win as u32).collect(),
team_wins: wins,
team_votes,
};