Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	theseus/src/error.rs
#	theseus_gui/src/components/ui/AccountsCard.vue
  • Loading branch information
DIDIRUS4 committed Nov 17, 2023
2 parents 13613f2 + 908460b commit e80d231
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions theseus/src/api/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use crate::{
launcher::auth as inner,
State,
};
use chrono::Utc;

use crate::state::AuthTask;
pub use inner::Credentials;
Expand Down Expand Up @@ -45,7 +44,7 @@ pub async fn refresh(user: uuid::Uuid) -> crate::Result<Credentials> {
crate::ErrorKind::OtherError(
"У вас нет аккаунта, пожалуйста добавьте его. Подробнее о добавлении оффлайн аккаунта можно узнать из статьи автора".to_string(),
)
.as_error()
.as_error()
})?;

Ok(credentials)
Expand Down Expand Up @@ -93,7 +92,7 @@ pub async fn get_user(user: uuid::Uuid) -> crate::Result<Credentials> {
crate::ErrorKind::OtherError(format!(
"Tried to get nonexistent user with ID {user}"
))
.as_error()
.as_error()
})?;
Ok(user)
}
4 changes: 2 additions & 2 deletions theseus/src/api/hydra/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub async fn wait_finish(device_code: String) -> crate::Result<Credentials> {
"Error getting XBox Live token: {}",
err
))
.as_error())
.as_error())
}
xsts_token::XSTSResponse::Success { token: xsts_token } => {
// Get xsts bearer token from xsts token
Expand All @@ -55,7 +55,7 @@ pub async fn wait_finish(device_code: String) -> crate::Result<Credentials> {
// Get player info from bearer token
let player_info = player_info::fetch_info(&bearer_token).await.map_err(|_err| {
crate::ErrorKind::HydraError("No Minecraft account for profile. Make sure you own the game and have set a username through the official Minecraft launcher."
.to_string())
.to_string())
})?;

// Create credentials
Expand Down
2 changes: 1 addition & 1 deletion theseus_gui/src-tauri/src/api/auth.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::api::Result;
use crate::api::{Result,};
use tauri::plugin::TauriPlugin;
use theseus::{hydra, hydra::init::DeviceLoginSuccess, prelude::*};
pub fn init<R: tauri::Runtime>() -> TauriPlugin<R> {
Expand Down

0 comments on commit e80d231

Please sign in to comment.