don't show duplicate boats for rennrowing
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use std::ops::DerefMut;
|
||||
|
||||
use itertools::Itertools;
|
||||
use rocket::serde::{Deserialize, Serialize};
|
||||
use rocket::FromForm;
|
||||
use sqlx::{FromRow, Sqlite, SqlitePool, Transaction};
|
||||
@ -7,7 +8,7 @@ use sqlx::{FromRow, Sqlite, SqlitePool, Transaction};
|
||||
use super::location::Location;
|
||||
use super::user::User;
|
||||
|
||||
#[derive(FromRow, Debug, Serialize, Deserialize)]
|
||||
#[derive(FromRow, Debug, Serialize, Deserialize, Eq, Hash, PartialEq, Clone)]
|
||||
pub struct Boat {
|
||||
pub id: i64,
|
||||
pub name: String,
|
||||
@ -279,6 +280,7 @@ ORDER BY amount_seats DESC
|
||||
.unwrap(); //TODO: fixme
|
||||
boats.extend(boats_in_ottensheim.into_iter());
|
||||
}
|
||||
let boats = boats.into_iter().unique().collect();
|
||||
|
||||
Self::boats_to_details(db, boats).await
|
||||
}
|
||||
|
Reference in New Issue
Block a user