From fc103599974240cbd5abcfbf2a6f93678e57c2ee Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 8 Feb 2022 20:13:24 +0100 Subject: store demo matches in database --- planetwars-server/src/routes/matches.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 94a5f45..089bd71 100644 --- a/planetwars-server/src/routes/matches.rs +++ b/planetwars-server/src/routes/matches.rs @@ -115,7 +115,7 @@ pub async fn list_matches(conn: DatabaseConnection) -> Result .map(|matches| Json(matches.into_iter().map(match_data_to_api).collect())) } -fn match_data_to_api(data: matches::MatchData) -> ApiMatch { +pub fn match_data_to_api(data: matches::MatchData) -> ApiMatch { ApiMatch { id: data.base.id, timestamp: data.base.created_at, -- cgit v1.2.3