From 3e902bb56e9626c8296e9836aa9ae19d82d48394 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Fri, 31 Dec 2021 11:24:25 +0100 Subject: list uploaded code bundles on bot page --- planetwars-server/src/db/bots.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'planetwars-server/src/db') diff --git a/planetwars-server/src/db/bots.rs b/planetwars-server/src/db/bots.rs index d21d9dc..eb66c05 100644 --- a/planetwars-server/src/db/bots.rs +++ b/planetwars-server/src/db/bots.rs @@ -57,3 +57,9 @@ pub fn create_code_bundle( .values(new_code_bundle) .get_result(conn) } + +pub fn find_bot_code_bundles(bot_id: i32, conn: &PgConnection) -> QueryResult> { + code_bundles::table + .filter(code_bundles::bot_id.eq(bot_id)) + .get_results(conn) +} -- cgit v1.2.3