pre-download static files, and add api versioning

This commit is contained in:
Aiden McClelland
2022-02-07 23:44:22 -07:00
committed by Aiden McClelland
parent 01d766fce9
commit d3c5648608
8 changed files with 171 additions and 115 deletions

View File

@@ -168,13 +168,6 @@ impl StaticFiles {
icon: format!("/public/package-data/{}/{}/icon.{}", id, version, icon_type),
}
}
pub fn remote(id: &PackageId, version: &Version) -> Self {
StaticFiles {
license: format!("/marketplace/package/license/{}?spec=={}", id, version),
instructions: format!("/marketplace/package/instructions/{}?spec=={}", id, version),
icon: format!("/marketplace/package/icon/{}?spec=={}", id, version),
}
}
}
#[derive(Debug, Deserialize, Serialize, HasModel)]