implement index deletion

This commit is contained in:
mpostma 2021-02-15 10:53:21 +01:00
parent a580a6a44d
commit a9e9e72840
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
5 changed files with 102 additions and 12 deletions

View file

@ -108,10 +108,16 @@ async fn update_index(
#[delete("/indexes/{index_uid}", wrap = "Authentication::Private")]
async fn delete_index(
_data: web::Data<Data>,
_path: web::Path<IndexParam>,
data: web::Data<Data>,
path: web::Path<IndexParam>,
) -> Result<HttpResponse, ResponseError> {
todo!()
match data.delete_index(path.index_uid.clone()).await {
Ok(_) => Ok(HttpResponse::Ok().finish()),
Err(e) => {
error!("{}", e);
todo!()
}
}
}
#[derive(Deserialize)]