Only an admin can delete an accommodation
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pierre HUBERT 2024-05-23 21:34:28 +02:00
parent 18582fdff7
commit bc800e7cf6

View File

@ -67,7 +67,10 @@ pub async fn create(
}
/// Delete an accommodation
pub async fn delete(m: FamilyAndAccommodationInPath) -> HttpResult {
pub async fn delete(
m: FamilyAndAccommodationInPath,
_admin: FamilyInPathWithAdminMembership,
) -> HttpResult {
accommodations_list_service::delete(&mut m.to_accommodation()).await?;
Ok(HttpResponse::Ok().finish())
}