diff --git a/Cargo.toml b/Cargo.toml index ec599d2..9350c62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sncf" -version = "1.4.0" +version = "1.5.0" authors = ["Association 42l "] edition = "2018" @@ -24,7 +24,7 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" chrono = { version = "0.4", features = ["serde"] } -regex = "1.3" +regex = "1.5" base64 = "0.13" rand = "0.8" askama = "0.10" diff --git a/src/forward.rs b/src/forward.rs index e29095d..a5cbd58 100644 --- a/src/forward.rs +++ b/src/forward.rs @@ -79,7 +79,7 @@ pub async fn forward( // sparing the use of a mutable body when not needed // For now, the body only needs to be modified when the route // is "create a new form" route - if route == "/ocs/v2.php/apps/forms/api/v1/form" { + if route == "/ocs/v2.php/apps/forms/api/v1.1/form" { // retreive the body from the request result let response_body = res.body().limit(PAYLOAD_LIMIT).await.map_err(|e| { eprintln!("error_forward_resp: {}", e); @@ -100,7 +100,7 @@ pub async fn forward( form_id ); let update_req = forge_from( - "/ocs/v2.php/apps/forms/api/v1/form/update", + "/ocs/v2.php/apps/forms/api/v1.1/form/update", &req, &url, &client, diff --git a/src/sniff.rs b/src/sniff.rs index 9bbd614..82ee07d 100644 --- a/src/sniff.rs +++ b/src/sniff.rs @@ -7,7 +7,7 @@ use crate::debug; // if it returns true, cancels the request pub fn check_request(route: &str, body: &web::Bytes) -> bool { match route { - "/ocs/v2.php/apps/forms/api/v1/form/update" => rq_form_update(body), + "/ocs/v2.php/apps/forms/api/v1.1/form/update" => rq_form_update(body), _ => false, } }