fix: user preview API

This commit is contained in:
2026-01-21 03:41:58 +08:00
parent 90d092729a
commit 9a5278c3a7
2 changed files with 7 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct GetUserPreviewApi { pub struct GetUserPreviewApi {
pub user_id: u32, pub user_id: u32,
pub client_id: &'static str,
pub token: Option<String>, pub token: Option<String>,
} }
@@ -13,6 +14,7 @@ impl From<u32> for GetUserPreviewApi {
fn from(user_id: u32) -> Self { fn from(user_id: u32) -> Self {
Self { Self {
user_id, user_id,
client_id: "A63E01C2805",
token: None, token: None,
} }
} }

View File

@@ -170,7 +170,11 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
&client, &client,
APIMethod::GetUserPreviewApi, APIMethod::GetUserPreviewApi,
user_id, user_id,
GetUserPreviewApi { user_id, token }, GetUserPreviewApi {
user_id,
client_id: "A63E01C2805",
token,
},
) )
.await?; .await?;