diff options
Diffstat (limited to 'planetwars-server/src/db')
-rw-r--r-- | planetwars-server/src/db/bots.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<Vec<CodeBundle>> { + code_bundles::table + .filter(code_bundles::bot_id.eq(bot_id)) + .get_results(conn) +} |