Update
This commit is contained in:
parent
80470c2fc9
commit
25d59d5b87
1 changed files with 9 additions and 1 deletions
10
src/lib.rs
10
src/lib.rs
|
@ -742,6 +742,8 @@ impl Client {
|
||||||
struct Data {
|
struct Data {
|
||||||
finished: bool,
|
finished: bool,
|
||||||
error: bool,
|
error: bool,
|
||||||
|
#[serde(rename = "messageId")]
|
||||||
|
message_id: i32,
|
||||||
#[serde(rename = "reportParams")]
|
#[serde(rename = "reportParams")]
|
||||||
report_params: String,
|
report_params: String,
|
||||||
}
|
}
|
||||||
|
@ -768,7 +770,13 @@ impl Client {
|
||||||
.await?
|
.await?
|
||||||
.json()
|
.json()
|
||||||
.await?;
|
.await?;
|
||||||
dbg!(resp);
|
dbg!(&resp);
|
||||||
|
|
||||||
|
if resp.error {
|
||||||
|
bail!("Error generating report");
|
||||||
|
} else if !resp.finished {
|
||||||
|
bail!("Report not finished");
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue