aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/routes/maps.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/routes/maps.rs')
-rw-r--r--planetwars-server/src/routes/maps.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/planetwars-server/src/routes/maps.rs b/planetwars-server/src/routes/maps.rs
index 689b11e..188089f 100644
--- a/planetwars-server/src/routes/maps.rs
+++ b/planetwars-server/src/routes/maps.rs
@@ -8,8 +8,8 @@ pub struct ApiMap {
pub name: String,
}
-pub async fn list_maps(conn: DatabaseConnection) -> Result<Json<Vec<ApiMap>>, StatusCode> {
- let maps = db::maps::list_maps(&conn).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?;
+pub async fn list_maps(mut conn: DatabaseConnection) -> Result<Json<Vec<ApiMap>>, StatusCode> {
+ let maps = db::maps::list_maps(&mut conn).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?;
let api_maps = maps
.into_iter()