Compare commits
2 Commits
b70929c5ce
...
fcb4d65d32
Author | SHA1 | Date | |
---|---|---|---|
fcb4d65d32 | |||
8c563a9c36 |
@ -58,7 +58,9 @@ async fn index(
|
||||
.map(|user| UserWithWaterStatus::from_user(user, db)),
|
||||
)
|
||||
.await;
|
||||
coxes.retain(|u| u.roles.contains(&"Donau Linz".into()));
|
||||
coxes.retain(|u| {
|
||||
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
|
||||
});
|
||||
|
||||
let mut users: Vec<UserWithWaterStatus> = futures::future::join_all(
|
||||
User::all(db)
|
||||
@ -67,7 +69,9 @@ async fn index(
|
||||
.map(|user| UserWithWaterStatus::from_user(user, db)),
|
||||
)
|
||||
.await;
|
||||
users.retain(|u| u.roles.contains(&"Donau Linz".into()));
|
||||
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;
|
||||
@ -149,20 +153,30 @@ async fn kiosk(
|
||||
_kiosk: KioskCookie,
|
||||
) -> Template {
|
||||
let boats = Boat::all(db).await;
|
||||
let coxes: Vec<UserWithWaterStatus> = futures::future::join_all(
|
||||
let mut coxes: Vec<UserWithWaterStatus> = futures::future::join_all(
|
||||
User::cox(db)
|
||||
.await
|
||||
.into_iter()
|
||||
.map(|user| UserWithWaterStatus::from_user(user, db)),
|
||||
)
|
||||
.await;
|
||||
let users: Vec<UserWithWaterStatus> = futures::future::join_all(
|
||||
|
||||
coxes.retain(|u| {
|
||||
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
|
||||
});
|
||||
|
||||
let mut 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user