aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/routes
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-07-14 21:50:42 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-07-14 21:50:42 +0200
commitec5c91d37b46cb3cec4878176469c66d2304dadd (patch)
tree16b4dd13605d1a3349a4240f3b25b134af572c84 /planetwars-server/src/routes
parent00459f9e3d818f0fb84160862f02898d64f98110 (diff)
downloadplanetwars.dev-ec5c91d37b46cb3cec4878176469c66d2304dadd.tar.xz
planetwars.dev-ec5c91d37b46cb3cec4878176469c66d2304dadd.zip
change runnerconfig to globalconfig
Diffstat (limited to 'planetwars-server/src/routes')
-rw-r--r--planetwars-server/src/routes/demo.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/planetwars-server/src/routes/demo.rs b/planetwars-server/src/routes/demo.rs
index 6f2d5e6..77f9e8d 100644
--- a/planetwars-server/src/routes/demo.rs
+++ b/planetwars-server/src/routes/demo.rs
@@ -3,8 +3,9 @@ use std::sync::Arc;
use crate::db;
use crate::db::matches::{FullMatchData, FullMatchPlayerData};
use crate::modules::bots::save_code_string;
-use crate::modules::matches::{MatchPlayer, MatchRunnerConfig, RunMatch};
+use crate::modules::matches::{MatchPlayer, RunMatch};
use crate::ConnectionPool;
+use crate::GlobalConfig;
use axum::extract::Extension;
use axum::Json;
use hyper::StatusCode;
@@ -32,7 +33,7 @@ pub struct SubmitBotResponse {
pub async fn submit_bot(
Json(params): Json<SubmitBotParams>,
Extension(pool): Extension<ConnectionPool>,
- Extension(runner_config): Extension<Arc<MatchRunnerConfig>>,
+ Extension(config): Extension<Arc<GlobalConfig>>,
) -> Result<Json<SubmitBotResponse>, StatusCode> {
let conn = pool.get().await.expect("could not get database connection");
@@ -50,7 +51,7 @@ pub async fn submit_bot(
.expect("could not save bot code");
let run_match = RunMatch::from_players(
- runner_config,
+ config,
vec![
MatchPlayer::BotVersion {
bot: None,