summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-10-16 20:07:59 +0200
committerCyborus <cyborus@cyborus.xyz>2024-10-16 20:07:59 +0200
commit6ad77c21915d1c9afc458ce58db2891487ae093f (patch)
tree3c2ebc7a66733b9e120b9b591f569008b50432d2 /generator
parentMerge pull request 'Clippy Fixes' (#74) from Pi-Cla/forgejo-api:clippy into main (diff)
downloadforgejo-api-6ad77c21915d1c9afc458ce58db2891487ae093f.tar.xz
forgejo-api-6ad77c21915d1c9afc458ce58db2891487ae093f.zip
feat: update to forgejo 9
Diffstat (limited to 'generator')
-rw-r--r--generator/src/methods.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/generator/src/methods.rs b/generator/src/methods.rs
index 141fc7d..1f3f697 100644
--- a/generator/src/methods.rs
+++ b/generator/src/methods.rs
@@ -379,10 +379,7 @@ fn create_method_request(
}
}
ParameterIn::FormData { param: _ } => {
- if !body_method.is_empty() {
- eyre::bail!("cannot have more than one body parameter");
- }
- body_method = format!(".multipart(reqwest::multipart::Form::new().part(\"attachment\", reqwest::multipart::Part::bytes({name}).file_name(\"file\").mime_str(\"*/*\").unwrap()))");
+ body_method += &format!(".multipart(reqwest::multipart::Form::new().part(\"attachment\", reqwest::multipart::Part::bytes({name}).file_name(\"file\").mime_str(\"*/*\").unwrap()))");
}
}
}