From 1e35e945b4bf74b5302fffe287ddf452cf5e089b Mon Sep 17 00:00:00 2001 From: Edoardo Borgia Leiva Date: Wed, 18 Dec 2024 00:17:14 +0100 Subject: [PATCH] Removed unstable methods and added missing parameter in auth.get_device_auth_from(). --- src/auth.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/auth.rs b/src/auth.rs index 88af090..40f0a65 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -132,7 +132,7 @@ impl DeviceCredentials { _ => { error!("Failed to get device_id!"); }, } } - pub fn get_device_auth_from(&mut self, access_token: &str, account_id: &str) { + pub fn get_device_auth_from(&mut self, http_client: &Client, access_token: &str, account_id: &str) { if access_token.is_empty() || account_id.is_empty() { error!("Device access token cannot be empty!"); @@ -140,7 +140,7 @@ impl DeviceCredentials { } let mut url : String = String::from("https://account-public-service-prod.ol.epicgames.com/account/api/public/account/"); - url.push_str(account_id.as_str()); + url.push_str(account_id); url.push_str("/deviceAuth"); /* @@ -166,10 +166,10 @@ impl DeviceCredentials { } let mut bearer_header = String::from("Bearer "); - bearer_header.push_str(access_token.as_str()); + bearer_header.push_str(access_token); let response = Client::post(&http_client, url) - .header("Authorization", bearer_header.as_str()) + .header("Authorization", bearer_header) .send(); match response {