diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-08 20:13:24 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-08 20:13:24 +0100 |
commit | fc103599974240cbd5abcfbf2a6f93678e57c2ee (patch) | |
tree | eb4c62696ded0f5beffd83c42efc475b81882b57 /planetwars-server/src/routes/matches.rs | |
parent | 69f33763ab7ff5876cff23fb90cfd2497b3fe371 (diff) | |
download | planetwars.dev-fc103599974240cbd5abcfbf2a6f93678e57c2ee.tar.xz planetwars.dev-fc103599974240cbd5abcfbf2a6f93678e57c2ee.zip |
store demo matches in database
Diffstat (limited to 'planetwars-server/src/routes/matches.rs')
-rw-r--r-- | planetwars-server/src/routes/matches.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<Json<Vec<ApiMatch> .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, |