From bdb77f97d6af5a59e80d2b2552cd6994754cbf29 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 1 Jan 2022 16:32:55 +0100 Subject: minimal port of start_match logic --- planetwars-server/src/db/bots.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'planetwars-server/src/db') diff --git a/planetwars-server/src/db/bots.rs b/planetwars-server/src/db/bots.rs index bef69c0..970dcf9 100644 --- a/planetwars-server/src/db/bots.rs +++ b/planetwars-server/src/db/bots.rs @@ -68,3 +68,10 @@ pub fn find_bot_code_bundles(bot_id: i32, conn: &PgConnection) -> QueryResult QueryResult { + code_bundles::table + .filter(code_bundles::bot_id.eq(bot_id)) + .order(code_bundles::created_at.desc()) + .first(conn) +} -- cgit v1.2.3