feat: prepare for 1.53 preview/login

This commit is contained in:
2026-01-09 01:33:18 +08:00
parent 15c6623ed8
commit e7b0bcbfed
5 changed files with 23 additions and 7 deletions

View File

@@ -165,12 +165,12 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
json_display(logout)?;
}
}
Commands::Preview { user_id } => {
Commands::Preview { user_id, token } => {
let preview: GetUserPreviewApiResp = Sdgb1_50::request(
&client,
APIMethod::GetUserPreviewApi,
user_id,
GetUserPreviewApi { user_id },
GetUserPreviewApi { user_id, token },
)
.await?;
@@ -430,6 +430,7 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
Commands::Userdata {
user_id,
skip_login,
token,
} => {
let action = async |_| match Sdgb1_50::request::<_, GetUserDataApiResp>(
&client,
@@ -450,7 +451,7 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
if skip_login {
action(UserLoginApiResp::default()).await;
} else {
login_action(&client, user_id, action).await?;
login_action(&client, user_id, token, action).await?;
}
}
}