mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 16:51:18 +10:00
fix: fix other metadata endpoints
This commit is contained in:
@ -136,7 +136,7 @@ impl GameDownloadAgent {
|
||||
let manifest_url = base_url
|
||||
.join(
|
||||
format!(
|
||||
"/api/v1/client/game/manifest?id={}&version={}",
|
||||
"/api/v1/client/metadata/manifest?id={}&version={}",
|
||||
self.id,
|
||||
encode(&self.version)
|
||||
)
|
||||
@ -308,7 +308,6 @@ impl GameDownloadAgent {
|
||||
sender.send(DownloadManagerSignal::Error(e)).unwrap();
|
||||
}
|
||||
}
|
||||
info!("Completed context id {}", index);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -180,7 +180,7 @@ pub fn fetch_game_verion_options_logic(
|
||||
) -> Result<Vec<GameVersionOption>, RemoteAccessError> {
|
||||
let client = reqwest::blocking::Client::new();
|
||||
|
||||
let response = make_request(&client, &["/api/v1/client/game/versions"], &[("id", &game_id)], |r| {
|
||||
let response = make_request(&client, &["/api/v1/client/metadata/versions"], &[("id", &game_id)], |r| {
|
||||
r.header("Authorization", generate_authorization_header())
|
||||
})?.send()?;
|
||||
|
||||
@ -189,10 +189,8 @@ pub fn fetch_game_verion_options_logic(
|
||||
warn!("{:?}", err);
|
||||
return Err(RemoteAccessError::InvalidResponse(err));
|
||||
}
|
||||
let text = response.text().unwrap();
|
||||
println!("JSON Text: {}", text);
|
||||
|
||||
let data: Vec<GameVersionOption> = serde_json::from_str(&text).unwrap();
|
||||
let data: Vec<GameVersionOption> = response.json()?;
|
||||
|
||||
let state_lock = state.lock().unwrap();
|
||||
let process_manager_lock = state_lock.process_manager.lock().unwrap();
|
||||
@ -295,7 +293,7 @@ pub fn on_game_complete(
|
||||
|
||||
let endpoint = base_url.join(
|
||||
format!(
|
||||
"/api/v1/client/game/version?id={}&version={}",
|
||||
"/api/v1/client/metadata/version?id={}&version={}",
|
||||
meta.id,
|
||||
encode(meta.version.as_ref().unwrap())
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user