From b3df5c6f8cc59e099a2f1db3df8089af4abca02e Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 5 Jul 2022 20:34:20 +0200 Subject: migrate code_bundles to bot_versions --- planetwars-server/src/routes/bots.rs | 2 +- planetwars-server/src/routes/matches.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'planetwars-server/src/routes') diff --git a/planetwars-server/src/routes/bots.rs b/planetwars-server/src/routes/bots.rs index df0c4d0..6d5d7df 100644 --- a/planetwars-server/src/routes/bots.rs +++ b/planetwars-server/src/routes/bots.rs @@ -215,7 +215,7 @@ pub async fn upload_code_multipart( let bundle = bots::NewCodeBundle { bot_id: Some(bot.id), - path: &folder_name, + code_bundle_path: &folder_name, }; let code_bundle = bots::create_code_bundle(&bundle, &conn).expect("Failed to create code bundle"); diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs index 5f95ce9..0c1bee4 100644 --- a/planetwars-server/src/routes/matches.rs +++ b/planetwars-server/src/routes/matches.rs @@ -1,7 +1,7 @@ -use std::path::PathBuf; use axum::{extract::Path, Json}; use hyper::StatusCode; use serde::{Deserialize, Serialize}; +use std::path::PathBuf; use crate::{ db::matches::{self, MatchState}, @@ -46,7 +46,6 @@ pub fn match_data_to_api(data: matches::FullMatchData) -> ApiMatch { } } - pub async fn get_match_data( Path(match_id): Path, conn: DatabaseConnection, -- cgit v1.2.3