Compare commits

..

No commits in common. "fcb4d65d3212102175126a0c102c928957c188ec" and "b70929c5cec10ab606cf31a89149700e1cf8bc83" have entirely different histories.

View File

@ -58,9 +58,7 @@ async fn index(
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
coxes.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
coxes.retain(|u| u.roles.contains(&"Donau Linz".into()));
let mut users: Vec<UserWithWaterStatus> = futures::future::join_all(
User::all(db)
@ -69,9 +67,7 @@ async fn index(
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
users.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
users.retain(|u| u.roles.contains(&"Donau Linz".into()));
let logtypes = LogType::all(db).await;
let distances = Logbook::distances(db).await;
@ -153,30 +149,20 @@ async fn kiosk(
_kiosk: KioskCookie,
) -> Template {
let boats = Boat::all(db).await;
let mut coxes: Vec<UserWithWaterStatus> = futures::future::join_all(
let coxes: Vec<UserWithWaterStatus> = futures::future::join_all(
User::cox(db)
.await
.into_iter()
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
coxes.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
let mut users: Vec<UserWithWaterStatus> = futures::future::join_all(
let users: Vec<UserWithWaterStatus> = futures::future::join_all(
User::all(db)
.await
.into_iter()
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
users.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
let logtypes = LogType::all(db).await;
let distances = Logbook::distances(db).await;