feat: prepare for 1.53 preview/login
This commit is contained in:
@@ -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?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user