frontend: Show group calendars

This commit is contained in:
Lennart
2025-04-12 13:13:16 +02:00
parent 30b0bf5b56
commit 63c16f411d
5 changed files with 22 additions and 35 deletions

View File

@@ -51,9 +51,15 @@ async fn route_user<CS: CalendarStore, AS: AddressbookStore>(
if user_id != user.id {
return actix_web::HttpResponse::Unauthorized().body("Unauthorized");
}
dbg!(&user);
let mut calendars = vec![];
for group in user.memberships() {
calendars.extend(cal_store.get_calendars(group).await.unwrap());
}
UserPage {
calendars: cal_store.get_calendars(&user.id).await.unwrap(),
calendars,
deleted_calendars: cal_store.get_deleted_calendars(&user.id).await.unwrap(),
addressbooks: addr_store.get_addressbooks(&user.id).await.unwrap(),
deleted_addressbooks: addr_store.get_deleted_addressbooks(&user.id).await.unwrap(),