diff --git a/meilisearch-http/src/routes/index.rs b/meilisearch-http/src/routes/index.rs index c7c9e521a..29ba3d0d8 100644 --- a/meilisearch-http/src/routes/index.rs +++ b/meilisearch-http/src/routes/index.rs @@ -115,7 +115,7 @@ async fn delete_index( path: web::Path, ) -> Result { match data.delete_index(path.index_uid.clone()).await { - Ok(_) => Ok(HttpResponse::Ok().finish()), + Ok(_) => Ok(HttpResponse::NoContent().finish()), Err(e) => { Ok(HttpResponse::BadRequest().body(serde_json::json!({ "error": e.to_string() }))) } diff --git a/meilisearch-http/tests/index/delete_index.rs b/meilisearch-http/tests/index/delete_index.rs index 39e79daaf..0d1a7c820 100644 --- a/meilisearch-http/tests/index/delete_index.rs +++ b/meilisearch-http/tests/index/delete_index.rs @@ -10,7 +10,7 @@ async fn create_and_delete_index() { let (_response, code) = index.delete().await; - assert_eq!(code, 200); + assert_eq!(code, 204); assert_eq!(index.get().await.1, 400); }