From ae57359353cf31ff374a8932999742920878bf00 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 12 Oct 2022 22:52:15 +0200 Subject: upgrade to diesel 2.0 --- planetwars-server/src/modules/client_api.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'planetwars-server/src/modules/client_api.rs') diff --git a/planetwars-server/src/modules/client_api.rs b/planetwars-server/src/modules/client_api.rs index 6e5d05a..9c0bbe7 100644 --- a/planetwars-server/src/modules/client_api.rs +++ b/planetwars-server/src/modules/client_api.rs @@ -149,19 +149,19 @@ impl pb::client_api_service_server::ClientApiService for ClientApiServer { req: Request, ) -> Result, Status> { // TODO: unify with matchrunner module - let conn = self.conn_pool.get().await.unwrap(); + let mut conn = self.conn_pool.get().await.unwrap(); let match_request = req.get_ref(); let (opponent_bot, opponent_bot_version) = - db::bots::find_bot_with_version_by_name(&match_request.opponent_name, &conn) + db::bots::find_bot_with_version_by_name(&match_request.opponent_name, &mut conn) .map_err(|_| Status::not_found("opponent not found"))?; let map_name = match match_request.map_name.as_str() { "" => "hex", name => name, }; - let map = db::maps::find_map_by_name(map_name, &conn) + let map = db::maps::find_map_by_name(map_name, &mut conn) .map_err(|_| Status::not_found("map not found"))?; let player_key = gen_alphanumeric(32); -- cgit v1.2.3