From 472b8caf9fc39d2113b3675a95c3eabd7d91b7ce Mon Sep 17 00:00:00 2001 From: skye Date: Thu, 27 Apr 2023 13:47:48 +0300 Subject: [PATCH] fix(client): api port, fix post request macros --- client/src/macros/request.rs | 4 ++-- client/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/macros/request.rs b/client/src/macros/request.rs index a0de0a9..820dded 100644 --- a/client/src/macros/request.rs +++ b/client/src/macros/request.rs @@ -21,7 +21,7 @@ macro_rules! get_request_auth { macro_rules! post_request { ($no:expr, $path:expr, $input:expr) => { $no.req - .get(&format!("{}{}", &$no.api_address, &$path)) + .post(&format!("{}{}", &$no.api_address, &$path)) .json($input) .send() .unwrap() @@ -32,7 +32,7 @@ macro_rules! post_request { macro_rules! post_request_auth { ($no:expr, $path:expr, $input:expr) => { $no.req - .get(&format!("{}{}", &$no.api_address, &$path)) + .post(&format!("{}{}", &$no.api_address, &$path)) .header("Authorization", &$no.user_token) .json($input) .send() diff --git a/client/src/main.rs b/client/src/main.rs index 893e80d..ee6dfcb 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -51,7 +51,7 @@ fn main() { // holds networking options and a request agent app.insert_resource(NetworkingOptions { - api_address: "http://localhost:8080/api".to_string(), + api_address: "http://localhost:3000/api".to_string(), req: reqwest::blocking::Client::new(), user_token: "".to_string(), }); -- 2.44.1