This commit is contained in:
Dominic Grimm 2023-01-27 20:30:11 +01:00
parent e1515ea207
commit f38d80d030
No known key found for this signature in database
GPG key ID: 6F294212DEAAC530

View file

@ -784,8 +784,6 @@ impl Client {
.await? .await?
.json() .json()
.await?; .await?;
dbg!(&resp);
if resp.data.error { if resp.data.error {
bail!("Error generating report"); bail!("Error generating report");
} else if !resp.data.finished { } else if !resp.data.finished {
@ -794,11 +792,9 @@ impl Client {
let mut records_url = self.webuntis_url.join("reports.do")?; let mut records_url = self.webuntis_url.join("reports.do")?;
records_url.set_query(Some(&resp.data.report_params)); records_url.set_query(Some(&resp.data.report_params));
dbg!(&records_url);
records_url records_url
.query_pairs_mut() .query_pairs_mut()
.append_pair("msgId", &resp.data.message_id.to_string()); .append_pair("msgId", &resp.data.message_id.to_string());
dbg!(&records_url);
let records = reqwest::Client::new() let records = reqwest::Client::new()
.get(records_url) .get(records_url)
.header(reqwest::header::USER_AGENT, &self.user_agent) .header(reqwest::header::USER_AGENT, &self.user_agent)
@ -815,7 +811,6 @@ impl Client {
.await? .await?
.text() .text()
.await?; .await?;
let mut reader = csv::ReaderBuilder::new() let mut reader = csv::ReaderBuilder::new()
.delimiter(b'\t') .delimiter(b'\t')
.from_reader(records.as_bytes()); .from_reader(records.as_bytes());