Only an admin can delete an accommodation
This commit is contained in:
parent
18582fdff7
commit
bc800e7cf6
@ -67,7 +67,10 @@ pub async fn create(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Delete an accommodation
|
/// 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?;
|
accommodations_list_service::delete(&mut m.to_accommodation()).await?;
|
||||||
Ok(HttpResponse::Ok().finish())
|
Ok(HttpResponse::Ok().finish())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user