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/routes | |
parent | d7b7585dd70f9d41184cf88c2ecbd88341898c38 (diff) | |
download | planetwars.dev-6ec792e3bd633a0b3971e401d29b2f8671f38b14.tar.xz planetwars.dev-6ec792e3bd633a0b3971e401d29b2f8671f38b14.zip |
NewBotVersion
Diffstat (limited to 'planetwars-server/src/routes')
-rw-r--r-- | planetwars-server/src/routes/bots.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/planetwars-server/src/routes/bots.rs b/planetwars-server/src/routes/bots.rs index 1ffedef..54c0d36 100644 --- a/planetwars-server/src/routes/bots.rs +++ b/planetwars-server/src/routes/bots.rs @@ -213,12 +213,13 @@ pub async fn upload_code_multipart( .extract(bots_dir.join(&folder_name)) .map_err(|_| StatusCode::BAD_REQUEST)?; - let bundle = bots::NewCodeBundle { + let bot_version = bots::NewBotVersion { bot_id: Some(bot.id), - code_bundle_path: &folder_name, + code_bundle_path: Some(&folder_name), + container_digest: None, }; let code_bundle = - bots::create_code_bundle(&bundle, &conn).expect("Failed to create code bundle"); + bots::create_bot_version(&bot_version, &conn).expect("Failed to create code bundle"); Ok(Json(code_bundle)) } |