fix version update route perf (#923)

* fix version update route perf

* fix tests
This commit is contained in:
Geometrically
2024-06-12 09:58:01 -07:00
committed by GitHub
parent b933202694
commit 872ffa02ce
8 changed files with 38 additions and 58 deletions

View File

@@ -49,13 +49,13 @@ impl super::Validator for ModpackValidator {
}
for file in &pack.files {
if file.hashes.get(&PackFileHash::Sha1).is_none() {
if !file.hashes.contains_key(&PackFileHash::Sha1) {
return Err(ValidationError::InvalidInput(
"All pack files must provide a SHA1 hash!".into(),
));
}
if file.hashes.get(&PackFileHash::Sha512).is_none() {
if !file.hashes.contains_key(&PackFileHash::Sha512) {
return Err(ValidationError::InvalidInput(
"All pack files must provide a SHA512 hash!".into(),
));