From 4a582e8079178a7ac11f2a492e7988fcdaa210cd Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 23 Jul 2022 23:40:25 +0200 Subject: store active version id in bots table --- planetwars-server/src/routes/bots.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'planetwars-server/src/routes/bots.rs') diff --git a/planetwars-server/src/routes/bots.rs b/planetwars-server/src/routes/bots.rs index 9ddb109..fc180d8 100644 --- a/planetwars-server/src/routes/bots.rs +++ b/planetwars-server/src/routes/bots.rs @@ -167,8 +167,9 @@ pub async fn get_my_bots( .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR) } +/// List all active bots pub async fn list_bots(conn: DatabaseConnection) -> Result>, StatusCode> { - bots::find_all_bots(&conn) + bots::find_active_bots(&conn) .map(Json) .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR) } -- cgit v1.2.3