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

@@ -134,7 +134,7 @@ async fn maybe_do_update(
) -> Result<Option<Arc<Revision>>, Error> {
let mut db = ctx.db.handle();
let latest_version = reqwest::get(format!(
"{}/eos/latest?eos-version={}&arch={}",
"{}/eos/v0/latest?eos-version={}&arch={}",
marketplace_url,
Current::new().semver(),
platforms::TARGET_ARCH,
@@ -295,7 +295,7 @@ impl std::fmt::Display for EosUrl {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{}/eos/eos.img?spec=={}&eos-version={}&arch={}",
"{}/eos/v0/eos.img?spec=={}&eos-version={}&arch={}",
self.base,
self.version,
Current::new().semver(),