Request body is now an object

This commit is contained in:
Gregory Schier
2023-11-12 11:16:12 -08:00
parent ef23a85577
commit 758154fa14
16 changed files with 73 additions and 54 deletions

View File

@@ -72,7 +72,7 @@ pub struct HttpRequest {
pub url: String,
#[serde(default = "default_http_request_method")]
pub method: String,
pub body: Option<String>,
pub body: Json<HashMap<String, JsonValue>>,
pub body_type: Option<String>,
pub authentication: Json<HashMap<String, JsonValue>>,
pub authentication_type: Option<String>,
@@ -497,7 +497,7 @@ pub async fn find_requests(
name,
url,
method,
body,
body AS "body!: Json<HashMap<String, JsonValue>>",
body_type,
authentication AS "authentication!: Json<HashMap<String, JsonValue>>",
authentication_type,
@@ -526,7 +526,7 @@ pub async fn get_request(id: &str, pool: &Pool<Sqlite>) -> Result<HttpRequest, s
name,
url,
method,
body,
body AS "body!: Json<HashMap<String, JsonValue>>",
body_type,
authentication AS "authentication!: Json<HashMap<String, JsonValue>>",
authentication_type,