From 4dc77e16263a701169b48187251dde7e375c9206 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 16 Feb 2022 18:40:32 +0100 Subject: add MatchState to ApiMatch --- planetwars-server/src/routes/matches.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'planetwars-server/src/routes/matches.rs') diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs index 44c8607..f2599cd 100644 --- a/planetwars-server/src/routes/matches.rs +++ b/planetwars-server/src/routes/matches.rs @@ -101,6 +101,7 @@ async fn run_match_task( pub struct ApiMatch { id: i32, timestamp: chrono::NaiveDateTime, + state: MatchState, players: Vec, } @@ -119,6 +120,7 @@ pub fn match_data_to_api(data: matches::MatchData) -> ApiMatch { ApiMatch { id: data.base.id, timestamp: data.base.created_at, + state: data.base.state, players: data .match_players .iter() -- cgit v1.2.3