only have a single user with details struct
This commit is contained in:
@ -13,7 +13,7 @@ use crate::model::{
|
||||
logbook::Logbook,
|
||||
tripdetails::TripDetails,
|
||||
triptype::TripType,
|
||||
user::{AllowedForPlannedTripsUser, User, UserWithRolesAndNotificationCount},
|
||||
user::{AllowedForPlannedTripsUser, User, UserWithDetails},
|
||||
usertrip::{UserTrip, UserTripDeleteError, UserTripError},
|
||||
};
|
||||
|
||||
@ -44,10 +44,7 @@ async fn index(
|
||||
}
|
||||
|
||||
context.insert("fee", &user.fee(db).await);
|
||||
context.insert(
|
||||
"loggedin_user",
|
||||
&UserWithRolesAndNotificationCount::from_user(user, db).await,
|
||||
);
|
||||
context.insert("loggedin_user", &UserWithDetails::from_user(user, db).await);
|
||||
context.insert("days", &days);
|
||||
Template::render("planned", context.into_json())
|
||||
}
|
||||
|
Reference in New Issue
Block a user