Add new API GhApiClient::remote_client

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-04 22:58:04 +10:00
parent 1ad2d0ad87
commit 6b0f4602b9
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -131,6 +131,10 @@ impl GhApiClient {
is_auth_token_valid: AtomicBool::new(true),
}))
}
pub fn remote_client(&self) -> &remote::Client {
&self.0.client
}
}
impl GhApiClient {
@ -560,7 +564,7 @@ mod test {
let browser_download_task = client.get_auth_token().map(|_| {
tokio::spawn(
Download::new(
client.0.client.clone(),
client.remote_client().clone(),
Url::parse(&format!(
"https://github.com/{}/{}/releases/download/{}/{}",
artifact.release.repo.owner,