Don't return an error when swapping 0 indexes

This commit is contained in:
Loïc Lecrenier 2022-10-20 11:31:43 +02:00 committed by Clément Renault
parent 11fee30f47
commit d20b5ddda0
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -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 };