From d20b5ddda08bdad814956053b9dd018b5f086037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Thu, 20 Oct 2022 11:31:43 +0200 Subject: [PATCH] Don't return an error when swapping 0 indexes --- meilisearch-http/src/routes/indexes_swap.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meilisearch-http/src/routes/indexes_swap.rs b/meilisearch-http/src/routes/indexes_swap.rs index c3f81da08..28a4c12d9 100644 --- a/meilisearch-http/src/routes/indexes_swap.rs +++ b/meilisearch-http/src/routes/indexes_swap.rs @@ -61,12 +61,6 @@ pub async fn indexes_swap( )); } } - if swaps.is_empty() { - return Err(ResponseError::from_msg( - "TODO: error message when swaps is empty".to_owned(), - Code::BadRequest, - )); - } let task = KindWithContent::IndexSwap { swaps };