Add an accommodations reservations module #188

Merged
pierre merged 81 commits from accomodation_module into master 2024-06-22 21:30:26 +00:00
Showing only changes of commit 70d8020610 - Show all commits

View File

@ -27,6 +27,10 @@ pub async fn create_reservation(
return Ok(HttpResponse::BadRequest().json("Start time is too far in the past!"));
}
if req.start == req.end {
return Ok(HttpResponse::BadRequest().json("Start and end time must be different!"));
}
if req.start > req.end {
return Ok(HttpResponse::BadRequest().json("End time happens before start time!"));
}