From 22a8f3d619e8ef89eeb9a60ab0a27aed01aa93f7 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sun, 27 Feb 2022 20:35:22 +0100 Subject: save all uploaded code bundles in database --- planetwars-server/src/db/bots.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'planetwars-server/src/db') diff --git a/planetwars-server/src/db/bots.rs b/planetwars-server/src/db/bots.rs index f7d8373..baabd5a 100644 --- a/planetwars-server/src/db/bots.rs +++ b/planetwars-server/src/db/bots.rs @@ -42,14 +42,14 @@ pub fn find_all_bots(conn: &PgConnection) -> QueryResult> { #[derive(Insertable)] #[table_name = "code_bundles"] pub struct NewCodeBundle<'a> { - pub bot_id: i32, + pub bot_id: Option, pub path: &'a str, } #[derive(Queryable, Serialize, Deserialize, Debug)] pub struct CodeBundle { pub id: i32, - pub bot_id: i32, + pub bot_id: Option, pub path: String, pub created_at: chrono::NaiveDateTime, } -- cgit v1.2.3