launchpad: drive the endpoints from data/launchpad.yml
This commit is contained in:
+2
-2
@@ -851,7 +851,7 @@ fn parse_ppa_url(ppa_base_url: &str) -> Option<(String, String)> {
|
||||
.strip_prefix("https://")
|
||||
.or_else(|| ppa_base_url.strip_prefix("http://"))?;
|
||||
let (host, path) = rest.split_once('/')?;
|
||||
if host != "ppa.launchpadcontent.net" {
|
||||
if host != crate::launchpad::ppa_content_host() {
|
||||
return None;
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@ pub async fn ppa_keyring_bytes(
|
||||
return Ok(cached.clone());
|
||||
}
|
||||
|
||||
let api_url = format!("https://api.launchpad.net/1.0/~{owner}/+archive/ubuntu/{name}");
|
||||
let api_url = crate::launchpad::archive_url(&owner, &name);
|
||||
let response = crate::distro_info::http_get_retried(&api_url).await?;
|
||||
if !response.status().is_success() {
|
||||
return Err(format!(
|
||||
|
||||
Reference in New Issue
Block a user