Improve peformance of search indexing, v2 fixes + new routes (#205)

* Refactor search to not spam the database with queries, new utility routes for V2

* Run prepare
This commit is contained in:
Geometrically
2021-06-02 18:33:11 -07:00
committed by GitHub
parent 16db28060c
commit 157962e42a
18 changed files with 833 additions and 763 deletions

View File

@@ -30,7 +30,11 @@ impl super::Validator for FabricValidator {
&self,
archive: &mut ZipArchive<Cursor<&[u8]>>,
) -> Result<ValidationResult, ValidationError> {
archive.by_name("fabric.mod.json")?;
archive.by_name("fabric.mod.json").map_err(|_| {
ValidationError::InvalidInputError(
"No fabric.mod.json present for Fabric file.".to_string(),
)
})?;
if !archive
.file_names()