diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-31 11:24:25 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-31 11:24:25 +0100 |
commit | 3e902bb56e9626c8296e9836aa9ae19d82d48394 (patch) | |
tree | 3b6b11fdf68c8d41f2b2bceebe1c2469ebc00cb6 /planetwars-server/src/db | |
parent | 0f27ca80fbdb3366e047def628123d3cc8ca051c (diff) | |
download | planetwars.dev-3e902bb56e9626c8296e9836aa9ae19d82d48394.tar.xz planetwars.dev-3e902bb56e9626c8296e9836aa9ae19d82d48394.zip |
list uploaded code bundles on bot page
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) +} |