aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/routes
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-10-25 18:09:58 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-10-25 18:09:58 +0200
commit095ad981db8e11fcda0207eaaad92b80ec9a990d (patch)
treec2018b9c6cf4f0ae768c525cbac55676e7bbdc60 /planetwars-server/src/routes
parent55c76db7b60ae142a1d224e4d485771d7be2b51f (diff)
downloadplanetwars.dev-095ad981db8e11fcda0207eaaad92b80ec9a990d.tar.xz
planetwars.dev-095ad981db8e11fcda0207eaaad92b80ec9a990d.zip
fix ordering in list_matches
Diffstat (limited to 'planetwars-server/src/routes')
-rw-r--r--planetwars-server/src/routes/matches.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/planetwars-server/src/routes/matches.rs b/planetwars-server/src/routes/matches.rs
index 10f5c5d..39c153d 100644
--- a/planetwars-server/src/routes/matches.rs
+++ b/planetwars-server/src/routes/matches.rs
@@ -75,8 +75,8 @@ pub async fn list_recent_matches(
let bot = db::bots::find_bot_by_name(&bot_name, &mut conn)
.map_err(|_| StatusCode::BAD_REQUEST)?;
- let opponent_id = if let Some(opponent_name) = params.opponent {
- let opponent = db::bots::find_bot_by_name(&opponent_name, &mut conn)
+ let opponent_id = if let Some(ref opponent_name) = params.opponent {
+ let opponent = db::bots::find_bot_by_name(opponent_name, &mut conn)
.map_err(|_| StatusCode::BAD_REQUEST)?;
Some(opponent.id)
} else {