mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 06:44:27 +01:00
delete index returns 204 instead of 200
This commit is contained in:
parent
0c17b166df
commit
58fab035bb
@ -115,7 +115,7 @@ async fn delete_index(
|
||||
path: web::Path<IndexParam>,
|
||||
) -> Result<HttpResponse, ResponseError> {
|
||||
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() })))
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user