Can get accommodations reservations of a family

This commit is contained in:
2024-05-31 22:09:33 +02:00
parent b34959df33
commit 51f8aaccb6
3 changed files with 28 additions and 1 deletions

View File

@@ -50,3 +50,11 @@ pub async fn create(a: FamilyInPath, req: web::Json<CreateCalendarQuery>) -> Htt
Ok(HttpResponse::Ok().json(calendar))
}
/// Get the list of calendars of the user
pub async fn get_list(a: FamilyInPath) -> HttpResult {
let users =
accommodations_reservations_calendars_service::get_all_of_user(a.user_id(), a.family_id())
.await?;
Ok(HttpResponse::Ok().json(users))
}