Skip to content

Commit 4c3294f

Browse files
committed
change
Signed-off-by: Jess Frazelle <[email protected]>
1 parent ff4215f commit 4c3294f

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

kittycad/src/meta.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ impl Meta {
202202
use std::convert::TryInto;
203203
let mut form = reqwest::multipart::Form::new();
204204
let mut json_part = reqwest::multipart::Part::text(serde_json::to_string(&body)?);
205-
json_part = json_part.file_name(format!("{}.json", "event"));
205+
json_part = json_part.file_name(format!("{}.json", "body"));
206206
json_part = json_part.mime_str("application/json")?;
207-
form = form.part("event", json_part);
207+
form = form.part("body", json_part);
208208
for attachment in attachments {
209209
form = form.part(attachment.name.clone(), attachment.try_into()?);
210210
}

kittycad/src/ml.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ impl Ml {
294294
use std::convert::TryInto;
295295
let mut form = reqwest::multipart::Form::new();
296296
let mut json_part = reqwest::multipart::Part::text(serde_json::to_string(&body)?);
297-
json_part = json_part.file_name(format!("{}.json", "texttocadmultifileiterationbody"));
297+
json_part = json_part.file_name(format!("{}.json", "body"));
298298
json_part = json_part.mime_str("application/json")?;
299-
form = form.part("texttocadmultifileiterationbody", json_part);
299+
form = form.part("body", json_part);
300300
for attachment in attachments {
301301
form = form.part(attachment.name.clone(), attachment.try_into()?);
302302
}

openapitor/src/functions.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -1205,11 +1205,6 @@ fn get_function_body(
12051205
}
12061206
"multipart/form-data" => {
12071207
// The json part of multipart data is sent as a file.
1208-
let type_name = request_body
1209-
.type_name
1210-
.rendered()?
1211-
.replace("crate::types::", "")
1212-
.to_lowercase();
12131208
if !multipart_has_body(&request_body.type_name)? {
12141209
// We don't add the body to the form.
12151210
quote! {
@@ -1234,9 +1229,9 @@ fn get_function_body(
12341229
// Add the body to the form.
12351230

12361231
let mut json_part = reqwest::multipart::Part::text(serde_json::to_string(&body)?);
1237-
json_part = json_part.file_name(format!("{}.json", #type_name));
1232+
json_part = json_part.file_name(format!("{}.json", "body"));
12381233
json_part = json_part.mime_str("application/json")?;
1239-
form = form.part(#type_name, json_part);
1234+
form = form.part("body", json_part);
12401235

12411236
// For each of the files add them to the form.
12421237
for attachment in attachments {

0 commit comments

Comments
 (0)