test the details of all tasks type

This commit is contained in:
Irevoire
2022-10-26 11:09:44 +02:00
committed by Tamo
parent 6167baa9eb
commit 1cf081f9a3
4 changed files with 642 additions and 3 deletions

View File

@ -20,7 +20,7 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
#[derive(Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SwapIndexesPayload {
swap: (String, String),
indexes: (String, String),
}
pub async fn swap_indexes(
@ -33,7 +33,7 @@ pub async fn swap_indexes(
let mut indexes_set = HashSet::<String>::default();
let mut unknown_indexes = HashSet::new();
let mut duplicate_indexes = HashSet::new();
for SwapIndexesPayload { swap: (lhs, rhs) } in params.into_inner().into_iter() {
for SwapIndexesPayload { indexes: (lhs, rhs) } in params.into_inner().into_iter() {
if !search_rules.is_index_authorized(&lhs) {
unknown_indexes.insert(lhs.clone());
}