This commit is contained in:
Dominic Grimm 2023-01-27 18:13:53 +01:00
parent 51c09d0e5a
commit 15dfc5982c
No known key found for this signature in database
GPG Key ID: 6F294212DEAAC530
1 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@ use chrono::Datelike;
use cookie::Cookie;
use serde::Deserialize;
use serde_json::json;
use url::Url;
fn deserialize_date<'de, D>(deserializer: D) -> Result<chrono::NaiveDate, D::Error>
where
@ -285,8 +286,8 @@ struct ApiTeachersResponse {
#[derive(Debug)]
pub struct Client {
pub webuntis_url: url::Url,
pub rpc_url: url::Url,
pub webuntis_url: Url,
pub rpc_url: Url,
pub client_name: String,
pub user_agent: String,
pub username: String,
@ -296,7 +297,7 @@ pub struct Client {
}
impl Client {
pub fn gen_rpc_url(endpoint: url::Url, school: &str) -> Result<url::Url> {
pub fn gen_rpc_url(endpoint: &Url, school: &str) -> Result<Url> {
let mut x = endpoint.join("jsonrpc.do")?;
x.query_pairs_mut().append_pair("school", school);