aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/routes')
-rw-r--r--planetwars-server/src/routes/matches.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs
index 4dfd44e..fed0f7b 100644
--- a/planetwars-server/src/routes/matches.rs
+++ b/planetwars-server/src/routes/matches.rs
@@ -1,4 +1,4 @@
-use std::{io::Read, path::PathBuf};
+use std::path::PathBuf;
use axum::{
extract::{Extension, Path},
@@ -10,7 +10,11 @@ use rand::{distributions::Alphanumeric, Rng};
use serde::{Deserialize, Serialize};
use crate::{
- db::{bots, matches, users::User},
+ db::{
+ bots,
+ matches::{self, MatchState},
+ users::User,
+ },
ConnectionPool, DatabaseConnection, BOTS_DIR, MAPS_DIR, MATCHES_DIR,
};
@@ -81,6 +85,7 @@ async fn run_match_task(
pool: ConnectionPool,
) {
let match_data = matches::NewMatch {
+ state: MatchState::Finished,
log_path: &log_file_name,
};