From 6ec792e3bd633a0b3971e401d29b2f8671f38b14 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Thu, 7 Jul 2022 18:57:46 +0200 Subject: NewBotVersion --- planetwars-server/src/modules/bots.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'planetwars-server/src/modules/bots.rs') diff --git a/planetwars-server/src/modules/bots.rs b/planetwars-server/src/modules/bots.rs index cd26ee0..629ecf6 100644 --- a/planetwars-server/src/modules/bots.rs +++ b/planetwars-server/src/modules/bots.rs @@ -15,9 +15,10 @@ pub fn save_code_bundle( std::fs::create_dir(&code_bundle_dir).unwrap(); std::fs::write(code_bundle_dir.join("bot.py"), bot_code).unwrap(); - let new_code_bundle = db::bots::NewCodeBundle { + let new_code_bundle = db::bots::NewBotVersion { bot_id, - code_bundle_path: &bundle_name, + code_bundle_path: Some(&bundle_name), + container_digest: None, }; - db::bots::create_code_bundle(&new_code_bundle, conn) + db::bots::create_bot_version(&new_code_bundle, conn) } -- cgit v1.2.3