Can delete a couple information

This commit is contained in:
2023-08-07 19:31:05 +02:00
parent ea84c45e8a
commit 3a219ff9e2
2 changed files with 10 additions and 0 deletions

View File

@ -144,3 +144,9 @@ pub async fn update(m: FamilyAndCoupleInPath, req: web::Json<CoupleRequest>) ->
Ok(HttpResponse::Accepted().finish())
}
/// Delete a couple
pub async fn delete(m: FamilyAndCoupleInPath) -> HttpResult {
couples_service::delete(&mut m.to_couple()).await?;
Ok(HttpResponse::Ok().finish())
}