Can get all the reservations of a given accommodation
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::extractors::accommodation_extractor::FamilyAndAccommodationInPath;
|
||||
use crate::extractors::family_extractor::FamilyInPath;
|
||||
use crate::services::accommodations_reservations_service;
|
||||
use actix_web::HttpResponse;
|
||||
|
||||
/// Get the reservations for a given accommodation
|
||||
pub async fn get_accommodation_reservations(a: FamilyAndAccommodationInPath) -> HttpResult {
|
||||
Ok(HttpResponse::Ok()
|
||||
.json(accommodations_reservations_service::get_all_of_accommodation(a.id()).await?))
|
||||
}
|
||||
|
||||
/// Get the full list of accommodations reservations for a family
|
||||
pub async fn full_list(m: FamilyInPath) -> HttpResult {
|
||||
Ok(HttpResponse::Ok()
|
||||
|
||||
Reference in New Issue
Block a user