@@ -128,7 +128,6 @@ pub struct WechatPollResp {
pub user_id: Option<i64>,
pub role: Option<String>,
pub nickname: Option<String>,
- #[allow(dead_code)]
pub message: Option<String>,
}
@@ -158,7 +158,12 @@ pub async fn start_wechat_login(app: AppHandle) -> Result<serde_json::Value, Str
let _ = handle.emit(
"pet://wechat-login",
- serde_json::json!({"status": "success", "nickname": resp.nickname}),
+ serde_json::json!({
+ "status": "success",
+ "nickname": resp.nickname,
+ "userId": resp.user_id,
+ "role": resp.role
+ }),
);
return;