0.7.25
This commit is contained in:
@@ -69,13 +69,15 @@ LIMIT 1
|
||||
.fetch_one(pool)
|
||||
.await;
|
||||
match id_result {
|
||||
Ok(id) => Ok(id),
|
||||
Err(error) => Err(crate::KbError::Db(format!(
|
||||
"cannot fetch kb_pool_origins id for pool_id '{}' on sqlite: {}",
|
||||
dto.pool_id, error
|
||||
))),
|
||||
Ok(id) => return Ok(id),
|
||||
Err(error) => {
|
||||
return Err(crate::KbError::Db(format!(
|
||||
"cannot fetch kb_pool_origins id for pool_id '{}' on sqlite: {}",
|
||||
dto.pool_id, error
|
||||
)));
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,13 +121,13 @@ LIMIT 1
|
||||
"cannot read kb_pool_origins by pool_id '{}' on sqlite: {}",
|
||||
pool_id, error
|
||||
)));
|
||||
}
|
||||
},
|
||||
};
|
||||
match entity_option {
|
||||
Some(entity) => crate::KbPoolOriginDto::try_from(entity).map(Some),
|
||||
None => Ok(None),
|
||||
Some(entity) => return crate::KbPoolOriginDto::try_from(entity).map(Some),
|
||||
None => return Ok(None),
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +168,7 @@ ORDER BY created_at ASC, id ASC
|
||||
"cannot list kb_pool_origins on sqlite: {}",
|
||||
error
|
||||
)));
|
||||
}
|
||||
},
|
||||
};
|
||||
let mut dtos = std::vec::Vec::new();
|
||||
for entity in entities {
|
||||
@@ -177,7 +179,7 @@ ORDER BY created_at ASC, id ASC
|
||||
};
|
||||
dtos.push(dto);
|
||||
}
|
||||
Ok(dtos)
|
||||
}
|
||||
return Ok(dtos);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user