diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-07 18:57:46 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-07 18:57:46 +0200 |
commit | 6ec792e3bd633a0b3971e401d29b2f8671f38b14 (patch) | |
tree | 932e4c39c9927630427775543ad311445deb98dd /planetwars-server/src/modules/bots.rs | |
parent | d7b7585dd70f9d41184cf88c2ecbd88341898c38 (diff) | |
download | planetwars.dev-6ec792e3bd633a0b3971e401d29b2f8671f38b14.tar.xz planetwars.dev-6ec792e3bd633a0b3971e401d29b2f8671f38b14.zip |
NewBotVersion
Diffstat (limited to 'planetwars-server/src/modules/bots.rs')
-rw-r--r-- | planetwars-server/src/modules/bots.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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) } |