aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/routes/matches.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-02-08 20:13:24 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-02-08 20:13:24 +0100
commitfc103599974240cbd5abcfbf2a6f93678e57c2ee (patch)
treeeb4c62696ded0f5beffd83c42efc475b81882b57 /planetwars-server/src/routes/matches.rs
parent69f33763ab7ff5876cff23fb90cfd2497b3fe371 (diff)
downloadplanetwars.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.rs2
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,