Formatting

This commit is contained in:
2025-06-03 21:57:22 -04:00
parent 263c33fd5a
commit 995e86f229
13 changed files with 68 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
use serde::Deserialize;
use crate::db;
use crate::error::ApiResult;
use serde::Deserialize;
const TABLE_NAME: &str = "user_airport_favorites";
@@ -19,14 +19,11 @@ impl UserFavorite {
"#,
TABLE_NAME
))
.bind(username)
.fetch_all(pool)
.await?;
.bind(username)
.fetch_all(pool)
.await?;
let favorites = user_favorites
.iter()
.map(|uf| uf.icao.clone())
.collect();
let favorites = user_favorites.iter().map(|uf| uf.icao.clone()).collect();
Ok(favorites)
}
@@ -57,10 +54,10 @@ impl UserFavorite {
"#,
TABLE_NAME
))
.bind(username)
.bind(icao)
.execute(pool)
.await?;
.bind(username)
.bind(icao)
.execute(pool)
.await?;
Ok(())
}