Merge pull request 'main' (#111) from main into staging
Reviewed-on: #111
This commit is contained in:
commit
29e7142883
@ -24,7 +24,7 @@ pub mod triptype;
|
|||||||
pub mod user;
|
pub mod user;
|
||||||
pub mod usertrip;
|
pub mod usertrip;
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize, Debug)]
|
||||||
pub struct Day {
|
pub struct Day {
|
||||||
day: NaiveDate,
|
day: NaiveDate,
|
||||||
planned_events: Vec<PlannedEventWithUserAndTriptype>,
|
planned_events: Vec<PlannedEventWithUserAndTriptype>,
|
||||||
|
@ -25,7 +25,7 @@ pub struct Trip {
|
|||||||
is_locked: bool,
|
is_locked: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize, Debug)]
|
||||||
pub struct TripWithUserAndType {
|
pub struct TripWithUserAndType {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub trip: Trip,
|
pub trip: Trip,
|
||||||
|
@ -57,7 +57,6 @@ async fn index(db: &State<SqlitePool>, user: User, flash: Option<FlashMessage<'_
|
|||||||
if let Some(msg) = flash {
|
if let Some(msg) = flash {
|
||||||
context.insert("flash", &msg.into_inner());
|
context.insert("flash", &msg.into_inner());
|
||||||
}
|
}
|
||||||
println!("{user:#?}");
|
|
||||||
context.insert("loggedin_user", &UserWithRoles::from_user(user, db).await);
|
context.insert("loggedin_user", &UserWithRoles::from_user(user, db).await);
|
||||||
context.insert("days", &days);
|
context.insert("days", &days);
|
||||||
Template::render("index", context.into_json())
|
Template::render("index", context.into_json())
|
||||||
|
Loading…
Reference in New Issue
Block a user